Public Types | |
enum | EventType { EventType.e_EventTypeUnknown = 0, EventType.e_EventTypePostPrint = 1, EventType.e_EventTypePrePrint = 2 } |
Enumeration for XFA event type. More... | |
enum | ExportDataType { ExportDataType.e_ExportDataTypeXML = 0, ExportDataType.e_ExportDataTypeStaticXDP = 1, ExportDataType.e_ExportDataTypeXDP = 2 } |
Enumeration for the type of exported data. More... | |
enum | Type { Type.e_Dynamic = 0, Type.e_Static = 1, Type.e_XDP = 2 } |
Enumeration for XFA document type. More... | |
Public Member Functions | |
XFADoc (PDFDoc document, DocProviderCallback xfa_doc_provider_handler) | |
Constructor. More... | |
XFADoc (XFADoc other) | |
Constructor, with another XFA document object. | |
void | ExportData (string output_file_path, XFADoc.ExportDataType export_type) |
Export data to a file. More... | |
void | FlattenTo (string output_file_path) |
Flatten current XFA document to a file. More... | |
XFAPage | GetPage (int page_index) |
Get XFA page by index. More... | |
int | GetPageCount () |
Get XFA page count. More... | |
XFADoc.Type | GetType () |
Get the XFA document type. More... | |
bool | ImportData (string file_path) |
Import data from an XML or XDP file. More... | |
bool | IsEmpty () |
Check whether current object is empty or not. More... | |
void | KillFocus () |
Kill the focus of XFA widget. More... | |
void | ProcessEvent (XFADoc.EventType event_type) |
Process a kind of event for all the XFA widgets in current XFA document. More... | |
void | ResetForm () |
Reset form. More... | |
void | SetPDFPath (string pdf_file_path) |
Set the path of related PDF document. More... | |
Progressive | StartLoad (PauseCallback pause) |
Start to load content for current XFA document. More... | |
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.
Enumeration for XFA event type.
Values of this enumeration should be used alone.
|
inline |
Constructor.
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. |
|
inline |
Export data to a file.
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. |
|
inline |
Flatten current XFA document to a file.
output_file_path | A file path, to which the flattening result will be saved. |
|
inline |
Get XFA page by index.
page_index | The page index. Valid range: from 0 to (count-1). count is returned by function addon::xfa::XFADoc::GetPageCount. |
|
inline |
Get XFA page count.
|
inline |
Get the XFA document type.
|
inline |
Import data from an XML or XDP file.
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". |
|
inline |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
|
inline |
Kill the focus of XFA widget.
|
inline |
Process a kind of event for all the XFA widgets in current XFA document.
event_type | An event type. Please refer to e_EventTypeXXX values and it should be one of these values except e_EventTypeUnknown. |
|
inline |
Reset form.
|
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.
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. |
|
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.
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. |