Package com.pd4ml.pdf.cos.util
Helpers for working with COS documents: page tree and outline navigation, inheritable page attributes, number trees, PDF dates, and copying objects between documents.
-
Class Summary Class Description COSObjectImporter Deep-clones a value (and everything it transitively references) from a sourceCOSDocumentinto a target one, allocating fresh indirect object numbers.NumberTreeUtil Looks up a value in a PDF "number tree" (/Numsleaf array of[key1, value1, key2, value2, ...]pairs, optionally split across/Kidswith/Limitsranges for large trees) -- the structure used by/StructTreeRoot/ParentTree,/PageLabelsand a handful of other PDF constructs.OutlineTree Reads and prunes a document's outline (bookmark) tree (/Root/Outlines, ISO 32000-1 12.3.3) via its/First//Nextsibling chain (each node's own children, if any, live under its own/First//Nextchain one level down).PageAttributes Walks a page dictionary's/Parentchain for an "inheritable" page attribute --/MediaBox,/CropBox,/Resources(ISO 32000-1 7.7.3.4, Table 30) -- that the page itself doesn't declare.PageTree Walks a parsed document's page tree (/Root/Pages/Kids/...), resolving indirect references at every step.PdfDates Formats aCalendaras a PDF date string (D:YYYYMMDDHHmmSSOHH'mm', ISO 32000-1 7.9.4) -- the format used for/Info'sCreationDate/ModDateentries.