THotPDF.FlattenLoadedFormFields Method
Paints selected loaded fields into static page content and removes only their field trees and widget annotations
Declaration
function FlattenLoadedFormFields(const FieldNames: array of AnsiString;
EnforceSignaturePermissions: Boolean = True): Integer;
Parameters
| Name | Purpose |
|---|---|
FieldNames | Fully qualified field names to flatten, or an empty array for every field |
EnforceSignaturePermissions | Refuse DocMDP and FieldMDP policy violations before modification |
Return value
Returns the number of matching fields flattened
Usage notes
- Text and choice appearances are regenerated before painting
- Only pages that own selected widgets receive appended content streams
- Untouched fields, annotations, pages and AcroForm resources remain present
- Incremental-update mode marks only changed objects for append-only saving
- Disabling the permission gate hands responsibility for the signature policy to the caller