NativeElixirPdfUtilities.Forms (native_elixir_pdf_utilities v0.18.0)
View SourceInspects, fills and flattens supported AcroForm fields in existing PDFs.
Values use fully qualified field names. Filling generates self-contained appearances using bundled DejaVu Sans, black text, and automatic sizing. Flattening removes active interactivity, not historical data or revisions. XFA and changes to signed documents are unsupported.
Summary
Functions
Returns field names, types, values, choices, read-only flags and widget page rectangles.
Fills named fields; flatten: true removes interactivity for the supplied fields after filling.
Flattens all supported fields, or the names supplied in fields: [...].
Functions
@spec fields(binary()) :: {:ok, [map()]} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Returns field names, types, values, choices, read-only flags and widget page rectangles.
@spec fill(binary(), map(), keyword()) :: {:ok, binary()} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Fills named fields; flatten: true removes interactivity for the supplied fields after filling.
@spec flatten( binary(), keyword() ) :: {:ok, binary()} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Flattens all supported fields, or the names supplied in fields: [...].
Uses current screen appearances. Hidden and NoView widgets are removed without painting. The Print flag does not affect flattening, so print-only widgets are omitted and screen-only widgets become ordinary page content.