THotPDF.FlattenLoadedXFA Method
Provides flatten loaded xfa behaviour for the XFA import and flattening workflow. Use it when the surrounding API family needs explicit control over PDF objects, page content, resources, conformance, or diagnostics
Declaration
function FlattenLoadedXFA(Editable: boolean= True): Integer;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Editable | Controls whether generated fields remain editable after the operation |
Return value
Returns an Integer value
Usage notes
- Use this API in the XFA import and flattening workflow before the affected page, resource, field, or catalog object is finalised
- Keep object names, field names, resource names, and returned handles stable until the document is finalised
- XFA workflows are rejected by PDF/A and PDF/X conformance modes, so flatten or remove packets before strict archival output
- Loaded-document object references may be indirect; resolve arrays, dictionaries, or streams before inspecting nested values