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

Method hasForm

src/api/pdf.ts:2610–2613  ·  view source on GitHub ↗

* Check if the document has an interactive form (AcroForm). * * This is a synchronous check that examines the catalog for an AcroForm entry. * Use this for quick checks before calling `getForm()`. * * @returns true if the document has an AcroForm dictionary * * @example * ```

()

Source from the content-addressed store, hash-verified

2608 * ```
2609 */
2610 hasForm(): boolean {
2611 const catalog = this.ctx.catalog.getDict();
2612 return catalog.has("AcroForm");
2613 }
2614
2615 /**
2616 * Get the document's interactive form.

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls 2

getDictMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected