THotPDF.EnsureLoadedAcroForm Method
Ensures the AcroForm dictionary of the loaded PDF exists and is accessible; if the document does not yet contain an AcroForm entry, it automatically creates and returns the corresponding dictionary object
Declaration
function EnsureLoadedAcroForm: THPDFDictionaryObject;
Unit
HPDFDoc
Return value
| Name | Purpose |
|---|---|
| This member takes no explicit parameters | |
Return value
Returns a THPDFDictionaryObject value
Usage notes
- The document must already have been loaded successfully (via LoadFromFile or LoadFromStream) before calling this method
- The returned dictionary object belongs to the document; the caller must not free it manually, nor continue to reference it after the document is closed
- To add fields to an existing form, call this method first to obtain the AcroForm dictionary, then add widgets via CreateLoadedFieldWidget