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§
- Archive
Resource - A retained file from the archive’s
media/directory, independent of rendering support. - Archive
Resource Resolver - Borrowed source lookup prepared once for a document’s media bindings.
- Body
Text Capture Window - Source context measured together for a native page capture.
- Body
Text Reflow - Full-source measurement context when usable saved page sections are absent.
- Body
Text Slice - Bounding
Box - An axis-aligned bounding box.
- Color
- An RGB color.
- Color
Paint Source - Color-effect source fields, including gradient settings on solid paints.
- Document
- A parsed
.sdocxdocument containing pages and metadata. - Document
Metadata - Document-level metadata extracted from the
.sdocxarchive. - EndTag
Display Timestamps - EndTag
Encryption - EndTag
Fixed Style - Format
Version - Samsung Notes binary format version.
- Formula
Label - Formula
Label Graph - Formula
Label Relation - Formula
Metadata - Formula
Stroke - Gradient
Stop Source - One saved gradient stop; order and repeated positions are significant.
- Image
Paint Source - Ordinary image-fill source fields; no runtime bitmap or resource hash.
- Integrity
Counts - Integrity
Report - Layer
Metadata - Layout
Document - A presentation-oriented view of a parsed document.
- Layout
Page - One visible page and the physical page record that backs it.
- Line
Legacy PenSource - Saved type-8 field-0 pen source, independent of the modern pen-name field.
- Math
Margins - Math
Metadata - Media
Asset - An embedded media asset.
- Media
Manifest - Modern
media/mediaInfo.dat(format versions newer than 3001). - Media
Manifest Entry - One size-bounded native media record.
- Native
Line - Geometry and styles decoded from the native
0 + 6 + 8line chain. - Native
Shape - Geometry and styles decoded from the native
0 + 6 + 7shape chain. - Nine
Patch Source - Saved integer nine-patch coordinates and source width.
- Note
Application Version - Note
Attachment - Note
Author - Note
Location - Note
Metadata - Note
Page Edit - Note
PenExtension - Note
PenSettings - Note
String Id - Note
String Table - Note
Voice - Note
Voice Event - Object
Bundle - Object
Bundle Entry - Object
Flexible Metadata - Object
Metadata - Object
Page Size - Object
Size - Object
Span Snapshot - Page
- A single page within a document.
- Page
Background - Optional fields of the native page background. Unknown values stay intact.
- Page
Manifest - Parsed contents of
pageIdInfo.dat. - Page
Manifest Entry - One ordered page entry from
pageIdInfo.dat. - Page
Object - An object at its stored position within a page or container.
- Page
Template - Compatibility summary of page template metadata.
- Paint
Float32 - A saved paint float, retaining NaN payloads and signed zero.
- Paragraph
Bullet - Decoded bullet, numbered-list, or checkbox paragraph value.
- Paragraph
Indent - Decoded indentation paragraph value.
- Paragraph
Line Spacing - Decoded line-spacing paragraph value.
- Paragraph
Predefined Style - Decoded predefined style and the style Samsung applies after Enter.
- Parse
Diagnostic - One non-fatal parser finding.
- Parse
Limits - Resource limits applied while parsing untrusted
.sdocxinput. - Parse
Options - Options controlling
.sdocxparsing. - Parse
Report - Non-fatal findings produced while interpreting an
.sdocxarchive. - Parsed
Document - A parsed document together with its physical archive structure.
- Pattern
Paint Source - The saved one-bit repeating tile and its two native ARGB colors.
- PdfPaper
Record - One saved PDF page placement, before native binding checks or runtime scaling.
- Placed
Image - A native image placement. Unresolved images retain their place in the model.
- Plot
Graph - Plot
Metadata - Point
- A 2D point.
- Progress
- Resolved
Archive Resource - A source binding whose bytes are retained; this does not certify a supported format.
- Rich
Text Box - Rich
Text Code Block - A fenced code block embedded in flowing note text.
- Rich
Text Hyperlink - Decoded hyperlink metadata from a rich-text span.
- Rich
Text Object Span - An object embedded into flowing text at a UTF-16 text index.
- Rich
Text Paragraph - A paragraph attribute record from Samsung’s rich-text model.
- Rich
Text Run - A rich text style run.
- Rich
Text Section - A page’s slice of a document-level flowing text object.
- Rich
Text Span - A style span from Samsung’s rich-text model.
- Rich
Text Suggestion - Decoded suggestion metadata from a rich-text span.
- Rich
Text Table - A table embedded in flowing note text.
- Rich
Text Table Cell - One cell in an embedded table.
- Rich
Text Table Row - One row in an embedded table.
- Shape
Base Source - Source relationships from the native type-6 shape-base frame, before resolution.
- Shape
Style - Outline settings shared by native shapes and lines.
- Stored
Archive Page - One physical
.pagerecord and its ZIP entry name. - Stored
EndTag - Stored
Layer - One Samsung Notes page layer.
- Stored
Note - Structured contents of
note.noteneeded by the document model. - Stored
Note Header - Fixed header fields at the beginning of
note.note. - Stored
Object - One object record in a stored layer, including its nested child records.
- Stored
Page - The physical representation of one
.pagearchive entry. - Stored
Page Header - Fixed header fields at the beginning of a
.pageentry. - Stored
Page Layers - The layer collection stored in one physical page.
- Stroke
- A single pen stroke consisting of points and associated data.
- Stroke
Metadata - Stroke
Properties - Stroke
Rendering - Rendering inputs retained from a saved stroke. Missing references remain unresolved.
- Stroke
Resources - Resolve saved IDs once per document; use the same resolver for debugger strokes.
- Stroke
Style - Table
Border - Table
Edge Style - Table
Record Metadata - Table
Style
Enums§
- Archive
Resource Content - Source-byte ownership for one retained archive resource.
- Archive
Resource Error - Failure to resolve a source reference, independent of native decoding or drawing.
- Bullet
Type - Samsung Notes list marker type.
- Diagnostic
Code - Stable category for a parser diagnostic.
- Diagnostic
Severity - Severity of a parser diagnostic.
- EndTag
Source - Error
- Errors that can occur when parsing an
.sdocxfile. - Formula
Label Relation Kind - Hyperlink
Type - Samsung hyperlink action identifiers.
- Line
Spacing Type - Unit used by Samsung’s line-spacing paragraph value.
- Math
Angle Type - Object
Bundle Value - Object
Layout Type - Object
Render Layer - Object
Resize Mode - Object
Span Layout Constraint - Cross-page constraint for an object embedded into text.
- Object
Span Layout Option - Placement option for an object embedded into text.
- Object
Type - Object type identifiers used by
SpenObjectBase. - Page
Element - A non-stroke page element.
- Page
Object Content - Page
Selection Error - An invalid one-based page selection, such as
1-3,5. - Page
Template Source - Page template backing source.
- Paragraph
Alignment - Horizontal paragraph alignment.
- Paragraph
Direction - Writing direction attached to an indentation paragraph.
- PdfPaper
Rectangle - Version-dependent encoding of a saved PDF destination rectangle.
- Predefined
Text Style - Samsung Notes predefined heading/body style.
- Progress
Stage - Units describe completed work within a stage, not elapsed processing time.
- Rich
Text Object Content - Parsed contents of an object embedded into flowing text.
- Rich
Text Paragraph Type - Samsung paragraph attribute identifiers.
- Rich
Text Span Type - Samsung rich-text span identifiers.
- Shape
Paint - Paint supported by the shape renderer, or an uninterpreted native effect.
- Shape
Paint Source - Saved source data independent of the renderer’s supported paint projection.
- Span
Interval Type - Native endpoint policy for caret lookup in a rich-text span.
- Table
Auto Fit - Text
Area Type
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
.sdocxfile from a filesystem path. - parse_
bytes - Parse a
.sdocxfile from in-memory bytes. - parse_
bytes_ detailed - Parse in-memory
.sdocxbytes and retain physical structure and diagnostics. - parse_
bytes_ detailed_ with_ options - Parse in-memory
.sdocxbytes 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
.sdocxbytes with explicit options. - parse_
detailed - Parse a
.sdocxfile and retain its physical page structure and diagnostics. - parse_
detailed_ with_ options - Parse a
.sdocxfile 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.noteentry. - parse_
note_ bytes_ with_ limits - Parse an uncompressed
note.noteentry with explicit resource limits. - parse_
page_ manifest_ bytes - Parse
pageIdInfo.datusing default resource limits. - parse_
page_ manifest_ bytes_ with_ limits - Parse
pageIdInfo.datwith 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
.pagearchive entry. - parse_
stored_ page_ bytes_ with_ limits - Parse one uncompressed
.pageentry with explicit resource limits. - parse_
with_ options - Parse a
.sdocxfile from a filesystem path with explicit options.
Type Aliases§
- Result
- A specialized
Resulttype for sdocx operations.