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

Function createPage

src/api/pdf-page-tree.test.ts:24–32  ·  view source on GitHub ↗

* Create a simple Page dict.

()

Source from the content-addressed store, hash-verified

22 * Create a simple Page dict.
23 */
24function createPage(): PdfDict {
25 const page = new PdfDict();
26 page.set("Type", PdfName.Page);
27 page.set(
28 "MediaBox",
29 new PdfArray([PdfNumber.of(0), PdfNumber.of(0), PdfNumber.of(612), PdfNumber.of(792)]),
30 );
31 return page;
32}
33
34/**
35 * Create a Pages (intermediate) node.

Callers 1

Calls 2

setMethod · 0.95
ofMethod · 0.45

Tested by

no test coverage detected