How to fill and flatten PDF forms ?
Interactive PDF forms are collections of fields for gathering information interactively from the user. The form fields are stored separately from the visual content. In simple terms, each form field typically has a name, type and a value. Each field also typically also has a visual appearance. If it does not have an appearance, it can be generated by PDF.
Common Use Cases
UniPDF has a comprehensive support for PDF forms. Key use cases:
- Create new forms on top of documents. For example create a PDF from Word with blanks and then add an interactive form on top of it.
- pdf_form_add.go shows how to add create and apply a new form to an existing PDF.
- Get list of fields from a form and their values. Relevant examples:
- Fill in a form with values.
- Flatten a form such that the content becomes part of the document and not editable.