MCPcopy Create free account
hub / github.com/LibPDF-js/core / fromRoot

Method fromRoot

src/api/pdf-page-tree.ts:141–147  ·  view source on GitHub ↗

* 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,
  )

Source from the content-addressed store, hash-verified

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.

Callers 1

createMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected