1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! PDF Logical Structure (Tagged PDF) support.
//!
//! This module implements parsing and traversal of PDF logical structure trees
//! according to ISO 32000-1:2008 Section 14.7.
//!
//! ## Overview
//!
//! Tagged PDFs contain explicit document structure that defines reading order,
//! semantic meaning, and accessibility information. This is the PDF-spec-compliant
//! way to determine reading order, as opposed to heuristic layout analysis.
//!
//! ## Structure Tree
//!
//! A structure tree consists of:
//! - **StructTreeRoot**: The root of the structure hierarchy
//! - **StructElem**: Structure elements (paragraphs, headings, sections, etc.)
//! - **ParentTree**: Maps marked content IDs to structure elements
//! - **Marked Content**: Tagged content in page streams (BMC/BDC/EMC operators)
//!
//! ## Reading Order
//!
//! Reading order is determined by pre-order traversal of the structure tree:
//! 1. Visit structure element
//! 2. Extract associated marked content
//! 3. Recursively visit children in order
//!
//! ## Example
//!
//! ```ignore
//! use pdf_oxide::structure::StructureTreeRoot;
//!
//! // Parse structure tree from document
//! if let Some(struct_tree) = document.structure_tree()? {
//! // Traverse in document order
//! for page_num in 0..document.page_count() {
//! let ordered_content = struct_tree.extract_ordered_content(page_num)?;
//! // Content is now in correct reading order!
//! }
//! }
//! ```
pub use StructureConverter;
pub use parse_structure_tree;
pub use ;
pub use ;
pub use ;
pub use ;