Skip to main content

Crate sdocx

Crate sdocx 

Source
Expand description

Reverse-engineered parser for Samsung Notes .sdocx documents.

§Accuracy and compatibility

Archive structure, format versions, page ordering, and supported packed stroke channels, standalone text/image/shape/line frames and media bind IDs are decoded from observed S Pen SDK contracts. Common shapes and supported line paths render to SVG. Text layout, image effects, advanced shape styles and other page objects remain best-effort. A successful parse can omit unsupported content and does not indicate a lossless decode. Preserve the source document when fidelity is important.

Structs§

ArchiveResource
A retained file from the archive’s media/ directory, independent of rendering support.
ArchiveResourceResolver
Borrowed source lookup prepared once for a document’s media bindings.
BodyTextCaptureWindow
Source context measured together for a native page capture.
BodyTextReflow
Full-source measurement context when usable saved page sections are absent.
BodyTextSlice
BoundingBox
An axis-aligned bounding box.
Color
An RGB color.
ColorPaintSource
Color-effect source fields, including gradient settings on solid paints.
Document
A parsed .sdocx document containing pages and metadata.
DocumentMetadata
Document-level metadata extracted from the .sdocx archive.
EndTagDisplayTimestamps
EndTagEncryption
EndTagFixedStyle
FormatVersion
Samsung Notes binary format version.
FormulaLabel
FormulaLabelGraph
FormulaLabelRelation
FormulaMetadata
FormulaStroke
GradientStopSource
One saved gradient stop; order and repeated positions are significant.
ImagePaintSource
Ordinary image-fill source fields; no runtime bitmap or resource hash.
IntegrityCounts
IntegrityReport
LayerMetadata
LayoutDocument
A presentation-oriented view of a parsed document.
LayoutPage
One visible page and the physical page record that backs it.
LineLegacyPenSource
Saved type-8 field-0 pen source, independent of the modern pen-name field.
MathMargins
MathMetadata
MediaAsset
An embedded media asset.
MediaManifest
Modern media/mediaInfo.dat (format versions newer than 3001).
MediaManifestEntry
One size-bounded native media record.
NativeLine
Geometry and styles decoded from the native 0 + 6 + 8 line chain.
NativeShape
Geometry and styles decoded from the native 0 + 6 + 7 shape chain.
NinePatchSource
Saved integer nine-patch coordinates and source width.
NoteApplicationVersion
NoteAttachment
NoteAuthor
NoteLocation
NoteMetadata
NotePageEdit
NotePenExtension
NotePenSettings
NoteStringId
NoteStringTable
NoteVoice
NoteVoiceEvent
ObjectBundle
ObjectBundleEntry
ObjectFlexibleMetadata
ObjectMetadata
ObjectPageSize
ObjectSize
ObjectSpanSnapshot
Page
A single page within a document.
PageBackground
Optional fields of the native page background. Unknown values stay intact.
PageManifest
Parsed contents of pageIdInfo.dat.
PageManifestEntry
One ordered page entry from pageIdInfo.dat.
PageObject
An object at its stored position within a page or container.
PageTemplate
Compatibility summary of page template metadata.
PaintFloat32
A saved paint float, retaining NaN payloads and signed zero.
ParagraphBullet
Decoded bullet, numbered-list, or checkbox paragraph value.
ParagraphIndent
Decoded indentation paragraph value.
ParagraphLineSpacing
Decoded line-spacing paragraph value.
ParagraphPredefinedStyle
Decoded predefined style and the style Samsung applies after Enter.
ParseDiagnostic
One non-fatal parser finding.
ParseLimits
Resource limits applied while parsing untrusted .sdocx input.
ParseOptions
Options controlling .sdocx parsing.
ParseReport
Non-fatal findings produced while interpreting an .sdocx archive.
ParsedDocument
A parsed document together with its physical archive structure.
PatternPaintSource
The saved one-bit repeating tile and its two native ARGB colors.
PdfPaperRecord
One saved PDF page placement, before native binding checks or runtime scaling.
PlacedImage
A native image placement. Unresolved images retain their place in the model.
PlotGraph
PlotMetadata
Point
A 2D point.
Progress
ResolvedArchiveResource
A source binding whose bytes are retained; this does not certify a supported format.
RichTextBox
RichTextCodeBlock
A fenced code block embedded in flowing note text.
RichTextHyperlink
Decoded hyperlink metadata from a rich-text span.
RichTextObjectSpan
An object embedded into flowing text at a UTF-16 text index.
RichTextParagraph
A paragraph attribute record from Samsung’s rich-text model.
RichTextRun
A rich text style run.
RichTextSection
A page’s slice of a document-level flowing text object.
RichTextSpan
A style span from Samsung’s rich-text model.
RichTextSuggestion
Decoded suggestion metadata from a rich-text span.
RichTextTable
A table embedded in flowing note text.
RichTextTableCell
One cell in an embedded table.
RichTextTableRow
One row in an embedded table.
ShapeBaseSource
Source relationships from the native type-6 shape-base frame, before resolution.
ShapeStyle
Outline settings shared by native shapes and lines.
StoredArchivePage
One physical .page record and its ZIP entry name.
StoredEndTag
StoredLayer
One Samsung Notes page layer.
StoredNote
Structured contents of note.note needed by the document model.
StoredNoteHeader
Fixed header fields at the beginning of note.note.
StoredObject
One object record in a stored layer, including its nested child records.
StoredPage
The physical representation of one .page archive entry.
StoredPageHeader
Fixed header fields at the beginning of a .page entry.
StoredPageLayers
The layer collection stored in one physical page.
Stroke
A single pen stroke consisting of points and associated data.
StrokeMetadata
StrokeProperties
StrokeRendering
Rendering inputs retained from a saved stroke. Missing references remain unresolved.
StrokeResources
Resolve saved IDs once per document; use the same resolver for debugger strokes.
StrokeStyle
TableBorder
TableEdgeStyle
TableRecordMetadata
TableStyle

Enums§

ArchiveResourceContent
Source-byte ownership for one retained archive resource.
ArchiveResourceError
Failure to resolve a source reference, independent of native decoding or drawing.
BulletType
Samsung Notes list marker type.
DiagnosticCode
Stable category for a parser diagnostic.
DiagnosticSeverity
Severity of a parser diagnostic.
EndTagSource
Error
Errors that can occur when parsing an .sdocx file.
FormulaLabelRelationKind
HyperlinkType
Samsung hyperlink action identifiers.
LineSpacingType
Unit used by Samsung’s line-spacing paragraph value.
MathAngleType
ObjectBundleValue
ObjectLayoutType
ObjectRenderLayer
ObjectResizeMode
ObjectSpanLayoutConstraint
Cross-page constraint for an object embedded into text.
ObjectSpanLayoutOption
Placement option for an object embedded into text.
ObjectType
Object type identifiers used by SpenObjectBase.
PageElement
A non-stroke page element.
PageObjectContent
PageSelectionError
An invalid one-based page selection, such as 1-3,5.
PageTemplateSource
Page template backing source.
ParagraphAlignment
Horizontal paragraph alignment.
ParagraphDirection
Writing direction attached to an indentation paragraph.
PdfPaperRectangle
Version-dependent encoding of a saved PDF destination rectangle.
PredefinedTextStyle
Samsung Notes predefined heading/body style.
ProgressStage
Units describe completed work within a stage, not elapsed processing time.
RichTextObjectContent
Parsed contents of an object embedded into flowing text.
RichTextParagraphType
Samsung paragraph attribute identifiers.
RichTextSpanType
Samsung rich-text span identifiers.
ShapePaint
Paint supported by the shape renderer, or an uninterpreted native effect.
ShapePaintSource
Saved source data independent of the renderer’s supported paint projection.
SpanIntervalType
Native endpoint policy for caret lookup in a rich-text span.
TableAutoFit
TextAreaType

Functions§

archive_zip_length
Length of the ZIP portion, excluding Samsung’s appended end tag.
layout_document
Build a visible-page view without changing the parsed storage model.
layout_document_with_progress
Build the same visible-page view while reporting completed pages.
parse
Parse a .sdocx file from a filesystem path.
parse_bytes
Parse a .sdocx file from in-memory bytes.
parse_bytes_detailed
Parse in-memory .sdocx bytes and retain physical structure and diagnostics.
parse_bytes_detailed_with_options
Parse in-memory .sdocx bytes in detail with explicit options.
parse_bytes_detailed_with_progress
Parse using the same decoder while observing completed archive and object work.
parse_bytes_with_options
Parse in-memory .sdocx bytes with explicit options.
parse_detailed
Parse a .sdocx file and retain its physical page structure and diagnostics.
parse_detailed_with_options
Parse a .sdocx file in detail with explicit options.
parse_end_tag_bytes
parse_end_tag_bytes_with_limits
parse_media_manifest_bytes
Parse a modern media manifest without loading any referenced files.
parse_media_manifest_bytes_with_limits
Parse a modern media manifest with the archive-entry limit applied to its count.
parse_note_bytes
Parse the structured title and body from an uncompressed note.note entry.
parse_note_bytes_with_limits
Parse an uncompressed note.note entry with explicit resource limits.
parse_page_manifest_bytes
Parse pageIdInfo.dat using default resource limits.
parse_page_manifest_bytes_with_limits
Parse pageIdInfo.dat with explicit resource limits.
parse_page_selection
Resolve one-based page numbers and inclusive ranges into sorted, unique zero-based visible-page indices. Accepts hyphens or en dashes and whitespace. Bounds are checked before a range is expanded.
parse_stored_page_bytes
Parse the physical structure of one uncompressed .page archive entry.
parse_stored_page_bytes_with_limits
Parse one uncompressed .page entry with explicit resource limits.
parse_with_options
Parse a .sdocx file from a filesystem path with explicit options.

Type Aliases§

Result
A specialized Result type for sdocx operations.