public interface AcroForm
Modifier and Type | Method and Description |
---|---|
void |
exportAsCSV(OutputStream os,
boolean exportEmpty)
Export field values in comma-separated-value format.
|
void |
exportAsCSV(String fileName,
boolean exportEmpty)
Export field values in comma-separated-value format.
|
void |
exportAsFDF(OutputStream outStream,
String pathToPDFFile,
boolean exportEmptyFields)
Exports AcroForm field data to an output stream in FDF format.
|
void |
exportAsFDF(String fileName,
boolean exportEmptyFields)
Exports AcroForm field data to a file in FDF format.
|
void |
exportAsText(OutputStream os,
boolean exportEmpty)
Export field values as text (separated by tabs).
|
void |
exportAsText(String fileName,
boolean exportEmpty)
Export field values as text (separated by tabs).
|
void |
exportAsXDP(OutputStream outStream,
String pdfReference,
boolean exportEmptyFields)
Exports XFA field data to an OutputStream.
|
void |
exportAsXDP(String fileName,
boolean exportEmptyFields)
Exports XFA field data to a file in XDP format.
|
void |
exportAsXFDF(OutputStream outStream,
String pathToPDFFile,
boolean exportEmptyFields)
Exports AcroForm field data to an output stream in XML format.
|
void |
exportAsXFDF(String fileName,
boolean exportEmptyFields)
Exports AcroForm field data to a file in XFDF format.
|
void |
exportAsXML(OutputStream outStream,
boolean useHierarchy,
boolean exportEmptyFields)
Export field values in a simple XML format.
|
void |
exportAsXML(String fileName,
boolean useHierarchy,
boolean exportEmptyFields)
Export field values in a simple XML format.
|
Vector<FormField> |
getCalculationOrder()
Gets the list of fields with calculate actions in the correct order.
|
FormField |
getField(String fieldName)
Gets a field by name.
|
Vector<FormField> |
getFieldList()
Gets the list of fields in this AcroForm.
|
Vector<SignatureField> |
getSignatureFields()
Gets a list of signature fields, if any.
|
boolean |
hasXFA()
Returns true if this AcroForm has Adobe XML Forms Architecture (XFA) data.
|
void |
importFDF(InputStream inStream)
Imports AcroForm field data from an input stream in FDF format.
|
void |
importFDF(String fileName)
Import AcroForm field data from a file in FDF Format.
|
void |
importXDP(InputStream inStream)
Imports XFA field data from an InputStream in XDP format.
|
void |
importXDP(String fileName)
Imports XFA field data from a file in XDP format.
|
void |
importXFDF(String fileName)
Imports AcroForm fields data from a file in XFDF Format.
|
void |
importXFDF(XMLElement topElement)
Import AcroForm field data from an xml element representing the top element of an fdf file.
|
boolean |
isXFADynamic()
Returns true if this AcroForm has Adobe XML Forms Architecture (XFA) data, and it is a Dynamic Form.
|
boolean |
isXFAStatic()
Returns true if this AcroForm has Adobe XML Forms Architecture (XFA) data, and it is a Static Form.
|
void |
removeXFA()
Removes the Adobe XML Forms Architecture (XFA) data from this AcroForm if present.
|
void |
resetFields()
Reset the form fields to their default value.
|
void exportAsXFDF(String fileName, boolean exportEmptyFields) throws PDFException
fileName
- The name of the file to export the data to.exportEmptyFields
- flag to indicate whether empty or null fields should be exported.PDFException
void exportAsFDF(String fileName, boolean exportEmptyFields) throws PDFException, IOException
exportEmptyFields
- flag to indicate whether empty or null fields should be exported.fileName
- The name of the file to export the data to.PDFException
IOException
void exportAsXDP(String fileName, boolean exportEmptyFields) throws PDFException, IOException
fileName
- The name of the file to export the data to.exportEmptyFields
- flag to indicate whether empty or null fields should be exported.PDFException
IOException
void exportAsXDP(OutputStream outStream, String pdfReference, boolean exportEmptyFields) throws PDFException, IOException
outStream
- The output stream to write the data to.pdfReference
- Reference to the PDF file. This is used to the pdf/href element in the XDP file. If null, the pdf/href element is not added to the output.exportEmptyFields
- flag to indicate whether empty or null fields should be exported.PDFException
IOException
void exportAsXFDF(OutputStream outStream, String pathToPDFFile, boolean exportEmptyFields) throws PDFException
outStream
- The output stream to write the data to.pathToPDFFile
- is the relative path from the fdf file to the pdf file name. This parameter can be left null.
This parameter is used to fill the pdf file name entry in the FDF file, the file entry will be set to pathToPDFFile + fileName
The file entry is used when you open an fdf file to be able to locate the corresponding pdf file.
Example of pathToPDFFile ../qoppa/mydirexportEmptyFields
- flag to indicate whether empty or null fields should be exported.PDFException
- Thrown if there are errors exporting the field data.void exportAsFDF(OutputStream outStream, String pathToPDFFile, boolean exportEmptyFields) throws PDFException, IOException
outStream
- The output stream to write the data to.pathToPDFFile
- is the relative path from the fdf file to the pdf file name. This parameter can be left null.
This parameter is used to fill the pdf file name entry in the FDF file, the file entry will be set to pathToPDFFile + fileName
The file entry is used when you open an fdf file to be able to locate the corresponding pdf file.exportEmptyFields
- flag to indicate whether empty or null fields should be exported.
Example of pathToPDFFile ../qoppa/mydirPDFException
IOException
Vector<FormField> getFieldList()
Vector<SignatureField> getSignatureFields()
FormField getField(String fieldName)
fieldName
- The name of a field in hierarchical form.void importFDF(String fileName) throws PDFException
fileName
- The name of the FDF file to import the data from.PDFException
void importFDF(InputStream inStream) throws PDFException
inStream
- The input stream in FDF format to read the data from.PDFException
void importXFDF(String fileName) throws PDFException
fileName
- The name of the XFDF file to import the data from.PDFException
void importXDP(String fileName) throws PDFException, IOException
fileName
- The name of the XDP file to read.PDFException
- Thrown if there is an error importing the XDP field data.IOException
- Thrown if there is a problem reading the XDP file.void importXDP(InputStream inStream) throws PDFException, IOException
inStream
- The input stream to read the XDP data from.PDFException
- Thrown if there is an error importing the XDP field data.IOException
- Thrown if there is an error reading the input stream.void importXFDF(XMLElement topElement) throws PDFException
topElement
- The xml element representing the XFDF file.PDFException
void resetFields() throws PDFException
PDFException
void exportAsXML(OutputStream outStream, boolean useHierarchy, boolean exportEmptyFields) throws PDFException, IOException
outStream
- Output stream to write the XML to.useHierarchy
- Preserve the hierarchy in the form in the XML output. If this parameter
is set to false, the output XML will have all the fields together in a single level below the root.PDFException
IOException
void exportAsXML(String fileName, boolean useHierarchy, boolean exportEmptyFields) throws PDFException, IOException
fileName
- Name of the file to output the XML to.useHierarchy
- Preserve the hierarchy in the form in the XML output. If this parameter
is set to false, the output XML will have all the fields together in a single level below the root.exportEmptyFields
- flag to indicate whether empty or null fields should be exported.PDFException
IOException
void exportAsCSV(OutputStream os, boolean exportEmpty) throws IOException
os
- Output stream to write the CSV to.exportEmpty
- Flag to indicate whether empty or null fields should be exported.IOException
void exportAsCSV(String fileName, boolean exportEmpty) throws IOException
fileName
- Name of the file to write the CSV to.exportEmpty
- Flag to indicate whether empty or null fields should be exported.IOException
void exportAsText(OutputStream os, boolean exportEmpty) throws IOException
os
- Output stream to write the text to.exportEmpty
- Flag to indicate whether empty or null fields should be exported.IOException
void exportAsText(String fileName, boolean exportEmpty) throws IOException
fileName
- Name of the file to write the text to.exportEmpty
- Flag to indicate whether empty or null fields should be exported.IOException
boolean hasXFA()
void removeXFA()
Vector<FormField> getCalculationOrder()
boolean isXFAStatic()
boolean isXFADynamic()