modern-pdf-lib / buildPageTree
Function: buildPageTree()
buildPageTree(
pages,registry):PdfRef
Defined in: src/core/pdfCatalog.ts:158
Build the /Pages tree and individual /Page dictionaries.
This implementation uses a flat page tree (a single /Pages node) which is correct for documents with up to several thousand pages.
Parameters
pages
readonly PageEntry[]
Ordered list of page entries.
registry
Object registry.
Returns
The indirect reference to the root /Pages node.