pub enum ReadingOrderMode {
TopToBottomLeftToRight,
ColumnAware,
StructureTreeFirst {
mcid_order: Vec<u32>,
},
}Expand description
Reading order determination mode for text blocks.
Determines how text blocks are ordered when converting to output formats.
Variants§
TopToBottomLeftToRight
Simple top-to-bottom, left-to-right ordering.
Sorts all blocks by Y coordinate (top to bottom), then by X coordinate (left to right). This works well for single-column documents.
ColumnAware
Column-aware reading order.
Uses the XY-Cut algorithm to detect columns and determines proper reading order across multiple columns. This works better for multi-column documents.
StructureTreeFirst
Structure tree first, with fallback to column-aware.
For Tagged PDFs: Uses the PDF logical structure tree (ISO 32000-1:2008 Section 14.7) to determine reading order via Marked Content IDs (MCIDs). This is the PDF-spec-compliant approach and provides perfect reading order for Tagged PDFs.
For Untagged PDFs: Falls back to ColumnAware (XY-Cut algorithm).
This mode requires passing MCID reading order through ConversionOptions.mcid_order.
Trait Implementations§
Source§impl Clone for ReadingOrderMode
impl Clone for ReadingOrderMode
Source§fn clone(&self) -> ReadingOrderMode
fn clone(&self) -> ReadingOrderMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more