View Source Pdf.Reader.AcroForm (ExPDF v1.0.1)

AcroForm field walker for Pdf.Reader.

Extracts interactive form fields from a PDF's AcroForm field tree, returning a flat list of leaf %Pdf.Reader.FormField{} structs with decoded names, types, values, flags, and rectangles.

Spec references

Summary

Functions

Reads all AcroForm leaf fields from a document.

Functions

@spec read(Pdf.Reader.Document.t()) ::
  {:ok, [Pdf.Reader.FormField.t()], Pdf.Reader.Document.t()} | {:error, term()}

Reads all AcroForm leaf fields from a document.

Returns {:ok, [FormField.t()], Document.t()} with a flat list of leaf fields. When no /AcroForm is present, or /Fields is empty, returns {:ok, [], doc}. Never returns {:error, _} for absent or empty AcroForms.