Class addon::xfa::XFADoc is constructed from a loaded PDF document object, in order to access XFA content more clearly. For a newly constructed XFA object, please remember to call function addon::xfa::XFADoc::StartLoad before using other functions in class XFA.
To search among a XFA document, please construct a pdf::TextSearch object with addon::xfa::XFADoc object.
- See also
- pdf::TextSearch
◆ EventType
Enumeration for XFA event type.
Values of this enumeration should be used alone.
Enumerator |
---|
e_EventTypeUnknown | Event type: Unknown.
|
e_EventTypePostPrint | This kind of event is triggered just after the rendered form has been sent to the printer, spooler, or output destination.
|
e_EventTypePrePrint | This kind of event is triggered just before the rendering for printing begins.
|
◆ ExportDataType
Enumeration for the type of exported data.
Values of this enumeration should be used alone.
Enumerator |
---|
e_ExportDataTypeXML | Type of exported data: XML.
|
e_ExportDataTypeStaticXDP | Type of exported data: Static XDP.
|
e_ExportDataTypeXDP | Type of exported data: XDP.
|
◆ Type
Enumeration for XFA document type.
Values of this enumeration should be used alone.
Enumerator |
---|
e_Dynamic | XFA document type: Dynamic.
|
e_Static | XFA document type: Static.
|
e_XDP | XFA document type: XDP, as Raw XML data.
|
◆ XFADoc() [1/2]
Constructor.
- Parameters
-
document | A valid PDF document. It should has been loaded successfully.
|
xfa_doc_provider_handler | An XFA document provider callback object which is implemented by user and based on callback class DocProviderCallback. It should not be null. User should ensure this callback object is kept valid until related PDF document is released.
|
- Note
- If module "XFA" is not defined in the license information which is used in function common::Library::Initialize, that means user has no right in using XFA related functions and this constructor will throw exception e_ErrInvalidLicense.
◆ XFADoc() [2/2]
foxit.addon.xfa.XFADoc.XFADoc |
( |
XFADoc |
other | ) |
|
|
inline |
Constructor, with another XFADoc object.
- Parameters
-
◆ ExportData()
Export data to a file.
- Parameters
-
output_file_path | A file path, to which data will be exported to.
|
export_type | Export type. Please refer to e_ExportDataTypeXXX values and it should be one of these values.
|
- Returns
- None.
◆ FlattenTo()
void foxit.addon.xfa.XFADoc.FlattenTo |
( |
string |
output_file_path | ) |
|
|
inline |
Flatten current XFA document to a file.
- Parameters
-
output_file_path | A file path, to which the flattening result will be saved.
|
- Returns
- None.
◆ GetPage()
XFAPage foxit.addon.xfa.XFADoc.GetPage |
( |
int |
page_index | ) |
|
|
inline |
Get XFA page by index.
- Parameters
-
- Returns
- The XFA page.
◆ GetPageCount()
int foxit.addon.xfa.XFADoc.GetPageCount |
( |
| ) |
|
|
inline |
Get XFA page count.
- Returns
- Page count.
◆ GetType()
Get the XFA document type.
- Returns
- The type of XFA document. Please refer to e_XXX values and it would be one of these values.
◆ ImportData()
bool foxit.addon.xfa.XFADoc.ImportData |
( |
string |
file_path | ) |
|
|
inline |
Import data from an XML or XDP file.
- Parameters
-
file_path | A path of a source file, whose data will be imported to current XFA document. It should be XML or XDP file and the file extension should be ".xml" or ".xdp".
|
- Returns
- true means success, while false means failure.
◆ IsEmpty()
bool foxit.addon.xfa.XFADoc.IsEmpty |
( |
| ) |
|
|
inline |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
- Returns
- true means current object is empty, while false means not.
◆ KillFocus()
void foxit.addon.xfa.XFADoc.KillFocus |
( |
| ) |
|
|
inline |
Kill the focus of XFA widget.
- Returns
- None.
◆ ProcessEvent()
Process a kind of event for all the XFA widgets in current XFA document.
- Parameters
-
event_type | An event type. Please refer to e_EventTypeXXX values and it should be one of these values except e_EventTypeUnknown.
|
- Returns
- true means success, while false means failure.
◆ ResetForm()
void foxit.addon.xfa.XFADoc.ResetForm |
( |
| ) |
|
|
inline |
◆ SetPDFPath()
void foxit.addon.xfa.XFADoc.SetPDFPath |
( |
string |
pdf_file_path | ) |
|
|
inline |
Set the path of related PDF document.
The PDF path will be used in function addon::xfa::XFADoc::ExportData, to be a part of exported data.
- Parameters
-
pdf_file_path | The file path of related PDF document. It can be either an absolute path or a relative path. It should not be an empty string.
|
- Returns
- None.
◆ StartLoad()
Progressive foxit.addon.xfa.XFADoc.StartLoad |
( |
PauseCallback |
pause | ) |
|
|
inline |
Start to load content for current XFA document.
It may take a long time to loading XFA content, so this function uses a progressive process to do this.
The related PDF document object has been loaded, but only PDF related contents have been loaded. So, in order to access XFA content, this function should be called to load XFA content.
- Parameters
-
pause | Pause object which decides if the importing process needs to be paused. This can be null which means not to pause during the parsing process. If this is not null, it should be a valid pause object implemented by user. |
- Returns
- A Progressive object. Please check the rate of current progress by function common::Progressive::GetRateOfProgress. If the rate is not 100 yet, call function common::Progressive::Continue to coninue the progress until the progress is finished.