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

Method load

src/document/forms/acro-form.ts:73–82  ·  view source on GitHub ↗

* Load AcroForm from catalog. * Returns null if no AcroForm present. * * @param catalog The document catalog dictionary * @param registry The object registry for resolving references * @param pageTree Optional page tree for efficient page lookups during flattening

(catalog: PdfDict, registry: ObjectRegistry, pageTree?: PDFPageTree)

Source from the content-addressed store, hash-verified

71 * @param pageTree Optional page tree for efficient page lookups during flattening
72 */
73 static load(catalog: PdfDict, registry: ObjectRegistry, pageTree?: PDFPageTree): AcroForm | null {
74 const resolve = registry.resolve.bind(registry);
75 const dict = catalog.getDict("AcroForm", resolve);
76
77 if (!dict) {
78 return null;
79 }
80
81 return new AcroForm(dict, registry, pageTree ?? null, catalog);
82 }
83
84 /**
85 * Default resources dictionary (fonts, etc.).

Callers 7

field-tree.test.tsFile · 0.45
acro-form.test.tsFile · 0.45
loadTaggedFormFunction · 0.45
getFieldTreeMethod · 0.45

Calls 1

getDictMethod · 0.65

Tested by 1

loadTaggedFormFunction · 0.36