Representation of the form fields within a PDF document.
Summary
Functions
Extracts form fields from the given PDF document or editor.
Extracts form fields from the given PDF document or editor, raising an error if it fails.
Sets the value of an existing form field on the given editor.
Sets the value of an existing form field on the given editor, raising an error if it fails.
Types
@type source() :: PdfElixide.Document.t() | PdfElixide.Editor.t()
Functions
@spec fields(source()) :: {:ok, [PdfElixide.Form.Field.t()]} | {:error, term()}
Extracts form fields from the given PDF document or editor.
@spec fields!(source()) :: [PdfElixide.Form.Field.t()]
Extracts form fields from the given PDF document or editor, raising an error if it fails.
@spec set_value(PdfElixide.Editor.t(), String.t(), PdfElixide.Form.Field.value()) :: :ok | {:error, term()}
Sets the value of an existing form field on the given editor.
The value uses the same tagged-tuple shape returned by fields/1
(e.g. {:text, "Jane Doe"}, {:boolean, true}, nil).
@spec set_value!(PdfElixide.Editor.t(), String.t(), PdfElixide.Form.Field.value()) :: :ok
Sets the value of an existing form field on the given editor, raising an error if it fails.