Skip to main content

Crate spdf_types

Crate spdf_types 

Source
Expand description

Public schema and error types for the spdf workspace.

Mirrors [liteparse/src/core/types.ts] so JSON output stays schema-compatible.

Structs§

BoundingBox
Axis-aligned bounding box defined by top-left and bottom-right corners.
Coordinates
A rectangle defined by position and dimensions.
DebugConfig
Grid projection debug knobs. Replaces the bespoke gridDebugLogger with a tracing-friendly config surface.
Image
Embedded image bounds, used for selective OCR.
JsonPage
One page of the JSON output.
JsonTextItem
A text element from JSON output.
MarkupData
Markup annotation data associated with a text item.
OcrData
Raw OCR detection result before conversion to TextItem.
ParseConfig
Full parser configuration. Defaults are identical to DEFAULT_CONFIG in [liteparse/src/core/config.ts].
ParseResult
The result of parsing a document.
ParseResultJson
Structured JSON output. Returned when output_format == Json.
ParsedPage
Parsed data for a single page.
ProjectionTextBox
A working copy of a text item used during grid projection. Separate from TextItem because it carries algorithm-internal metadata.
RegionFilter
ScreenshotResult
Result of rendering a page to an image.
TextItem
An individual text element extracted from a page.

Enums§

Language
One or more language codes.
OutputFormat
Output format.
ParseInput
A document source: either a file path or raw bytes.
Snap
Snap alignment for a projection box.
SpdfError

Type Aliases§

SpdfResult