Logical layer: structure tree, marked content, role mapping. Basis of PDF/UA-2 (ISO 14289-2).
| Module | Returns | Deps | Description |
|---|---|---|---|
pdfStructTree |
{ typeStructTreeRoot } |
pdfErrors, pdfParser |
Root, §14.7.2. |
pdfStructElement |
{ typeStructElement } |
pdfErrors, pdfParser |
Elem, §14.7.3. |
pdfRoleMap |
{ typeRoleMap, resolveStandardType, isStandardType, STANDARD_TYPES } |
pdfErrors, pdfParser |
RoleMap, §14.7.4. |
pdfParentTree |
{ lookupParent } |
pdfErrors, pdfParser |
ParentTree, §14.7.5. |
pdfClassMap |
{ typeClassMap, getClassAttributes } |
pdfErrors, pdfParser |
ClassMap, §14.7.6. |
pdfMarkedContent |
{ extractMcids, resolveMcidToStruct } |
pdfErrors, pdfParser, pdfParentTree |
BMC/BDC/EMC, §14.6. |
PDF/UA-2 pattern
const st = runtime.resolve('pdfStructTree');
const root = st.typeStructTreeRoot(doc._raw.resolve(doc.catalog.structTreeRoot));
// walk root.kids → pdfStructElement.typeStructElement