* Create a page tree from an existing root dict. * * Used when creating a new document with a fresh page tree. * * @param rootRef Reference to the Pages dict * @param root The Pages dict * @param getPageDict Function to look up page dicts by ref
(
rootRef: PdfRef,
root: PdfDict,
getPageDict: (ref: PdfRef) => PdfDict | null,
)
| 139 | * @param getPageDict Function to look up page dicts by ref |
| 140 | */ |
| 141 | static fromRoot( |
| 142 | rootRef: PdfRef, |
| 143 | root: PdfDict, |
| 144 | getPageDict: (ref: PdfRef) => PdfDict | null, |
| 145 | ): PDFPageTree { |
| 146 | return new PDFPageTree(rootRef, root, [], getPageDict); |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * Get all page references in document order. |