Foxit PDF SDK
|
Public Member Functions | |
def | XFADoc (document) |
Constructor. More... | |
def | XFADoc (other) |
Constructor, with another XFA document object. More... | |
def | ExportData (output_file_path, export_type) |
Export data to a file. More... | |
def | FlattenTo (output_file_path) |
Flatten current XFA document to a file. More... | |
def | FlattenTo (stream) |
Flatten current XFA document to a file stream. More... | |
def | GetPage (page_index) |
Get XFA page by index. More... | |
def | GetPageCount () |
Get XFA page count. More... | |
def | GetType () |
Get the XFA document type. More... | |
def | GetWidgetByFullName (full_name) |
Get the XFA widget which matches the specified full name. More... | |
def | ImportData (file_path) |
Import data from an XML or XDP file. More... | |
def | ImportData (file_reader) |
Import data from a FoxitPDFSDKPython3.FileReaderCallback object. More... | |
def | IsEmpty () |
Check whether current object is empty or not. More... | |
def | KillFocus () |
Kill the focus of XFA widget. More... | |
def | ProcessEvent (event_type) |
Process a kind of event for all the XFA widgets in current XFA document. More... | |
def | ResetForm () |
Reset form. More... | |
def | SetDocProviderCallback (doc_provider_callback) |
Set XFA document provider callback. More... | |
def | SetFocus (xfa_widget) |
Set the focus of XFA widget. More... | |
def | SetPDFPath (pdf_file_path) |
Set the path of related PDF document. More... | |
def | StartLoad (pause) |
Start to load content for current XFA document. More... | |
Static Public Attributes | |
e_Dynamic = _fsdk.XFADoc_e_Dynamic | |
XFA document type: Dynamic. | |
e_EventTypePostPrint = _fsdk.XFADoc_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 = _fsdk.XFADoc_e_EventTypePrePrint | |
This kind of event is triggered just before the rendering for printing begins. | |
e_EventTypeUnknown = _fsdk.XFADoc_e_EventTypeUnknown | |
Event type: Unknown. | |
e_ExportDataTypeStaticXDP = _fsdk.XFADoc_e_ExportDataTypeStaticXDP | |
Type of exported data: Static XDP. | |
e_ExportDataTypeXDP = _fsdk.XFADoc_e_ExportDataTypeXDP | |
Type of exported data: XDP. | |
e_ExportDataTypeXML = _fsdk.XFADoc_e_ExportDataTypeXML | |
Type of exported data: XML. | |
e_Static = _fsdk.XFADoc_e_Static | |
XFA document type: Static. | |
e_XDP = _fsdk.XFADoc_e_XDP | |
XFA document type: XDP, as Raw XML data. | |
Class XFADoc is constructed from a loaded PDF document object, in order to access XFA content more clearly. User must call FoxitPDFSDKPython3.Library.RegisterXFAAppProviderCallback before using XFA moudle. For a newly constructed XFA object, please remember to call function FoxitPDFSDKPython3.XFADoc.StartLoad before using other functions in class XFA.
To search among an XFA document, please construct a FoxitPDFSDKPython3.TextSearch object with XFADoc object.
def FoxitPDFSDKPython3.XFADoc.XFADoc | ( | document | ) |
Constructor.
When constructing an XFADoc by this constructor successfully, user must set XFA document provider callback by function FoxitPDFSDKPython3.XFADoc.SetDocProviderCallback .
[in] | document | A valid PDF document. It should has been loaded successfully. |
def FoxitPDFSDKPython3.XFADoc.XFADoc | ( | other | ) |
Constructor, with another XFA document object.
[in] | other | Another XFA document object |
def FoxitPDFSDKPython3.XFADoc.ExportData | ( | output_file_path, | |
export_type | |||
) |
Export data to a file.
[in] | output_file_path | A file path, to which data will be exported to. |
[in] | export_type | Export type. Please refer to values starting from FoxitPDFSDKPython3.XFADoc.e_ExportDataTypeXML and this should be one of these values. |
def FoxitPDFSDKPython3.XFADoc.FlattenTo | ( | output_file_path | ) |
Flatten current XFA document to a file.
[in] | output_file_path | A file path, to which the flattening result will be saved. |
def FoxitPDFSDKPython3.XFADoc.FlattenTo | ( | stream | ) |
Flatten current XFA document to a file stream.
[in] | stream | A FoxitPDFSDKPython3.StreamCallback object which is implemented by user to save the flattened result. |
def FoxitPDFSDKPython3.XFADoc.GetPage | ( | page_index | ) |
Get XFA page by index.
[in] | page_index | The page index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.XFADoc.GetPageCount . |
def FoxitPDFSDKPython3.XFADoc.GetPageCount | ( | ) |
Get XFA page count.
def FoxitPDFSDKPython3.XFADoc.GetType | ( | ) |
Get the XFA document type.
def FoxitPDFSDKPython3.XFADoc.GetWidgetByFullName | ( | full_name | ) |
Get the XFA widget which matches the specified full name.
Some XFA widgets may cover serveral XFA pages. In this case, this function can only be used to get the first matched XFA widget in XFA document. User can also use function FoxitPDFSDKPython3.XFAPage.GetWidgetByFullName to get the matched XFA widget in an XFA page.
[in] | full_name | An XFA widget's full name. It should not be an empty string. XFA widget's full name can be retrieved by function FoxitPDFSDKPython3.XFAWidget.GetName with type FoxitPDFSDKPython3.XFAWidget.e_WidgetNameTypeFullName in previous process. |
def FoxitPDFSDKPython3.XFADoc.ImportData | ( | file_path | ) |
Import data from an XML or XDP file.
[in] | 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". |
def FoxitPDFSDKPython3.XFADoc.ImportData | ( | file_reader | ) |
Import data from a FoxitPDFSDKPython3.FileReaderCallback object.
[in] | file_reader | A FoxitPDFSDKPython3.FileReaderCallback object, whose data will be imported to current XFA document. It should be XML or XDP file. |
def FoxitPDFSDKPython3.XFADoc.IsEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
def FoxitPDFSDKPython3.XFADoc.KillFocus | ( | ) |
Kill the focus of XFA widget.
def FoxitPDFSDKPython3.XFADoc.ProcessEvent | ( | event_type | ) |
Process a kind of event for all the XFA widgets in current XFA document.
[in] | event_type | An event type. Please refer to values starting from FoxitPDFSDKPython3.XFADoc.e_EventTypePostPrint and this should be one of these values except FoxitPDFSDKPython3.XFADoc.e_EventTypeUnknown . |
def FoxitPDFSDKPython3.XFADoc.ResetForm | ( | ) |
Reset form.
def FoxitPDFSDKPython3.XFADoc.SetDocProviderCallback | ( | doc_provider_callback | ) |
Set XFA document provider callback.
[in] | doc_provider_callback | 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. |
def FoxitPDFSDKPython3.XFADoc.SetFocus | ( | xfa_widget | ) |
Set the focus of XFA widget.
[in] | xfa_widget | An XFA widget which would be focused. |
def FoxitPDFSDKPython3.XFADoc.SetPDFPath | ( | pdf_file_path | ) |
Set the path of related PDF document.
The PDF path will be used in function FoxitPDFSDKPython3.XFADoc.ExportData , to be a part of exported data.
[in] | 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. |
def FoxitPDFSDKPython3.XFADoc.StartLoad | ( | pause | ) |
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.
[in] | 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. |