public final class PDAcroForm extends Object implements COSObjectable
| Constructor and Description |
|---|
PDAcroForm(PDDocument doc)
Constructor.
|
PDAcroForm(PDDocument doc,
COSDictionary form)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FDFDocument |
exportFDF()
This will export all FDF form data.
|
COSDictionary |
getCOSObject()
Convert this standard java object to a COS object.
|
String |
getDefaultAppearance()
Get the default appearance.
|
PDResources |
getDefaultResources()
This will get the default resources for the acro form.
|
PDField |
getField(String fullyQualifiedName)
This will get a field by name, possibly using the cache if setCache is true.
|
List<PDField> |
getFields()
This will return all of the documents root fields.
|
boolean |
getNeedAppearances()
True if the viewing application should construct the appearances of all field widgets.
|
int |
getQ()
This will get the 'quadding' or justification of the text to be displayed.
|
PDXFAResource |
getXFA()
Get the XFA resource, the XFA resource is only used for PDF 1.5+ forms.
|
boolean |
hasXFA()
This will tell if the AcroForm has XFA content.
|
void |
importFDF(FDFDocument fdf)
This method will import an entire FDF document into the PDF document
that this acroform is part of.
|
boolean |
isAppendOnly()
Determines if AppendOnly is set.
|
boolean |
isCachingFields()
This will tell if this acro form is caching the fields.
|
boolean |
isSignaturesExist()
Determines if SignaturesExist is set.
|
void |
setAppendOnly(boolean appendOnly)
Set the AppendOnly bit.
|
void |
setCacheFields(boolean cache)
This will tell this form to cache the fields into a Map structure
for fast access via the getField method.
|
void |
setDefaultAppearance(String daValue)
Set the default appearance.
|
void |
setDefaultResources(PDResources dr)
This will set the default resources for the acroform.
|
void |
setFields(List<PDField> fields)
Set the documents root fields.
|
void |
setNeedAppearances(Boolean value)
Set the NeedAppearances value.
|
void |
setQ(int q)
This will set the quadding/justification of the text.
|
void |
setSignaturesExist(boolean signaturesExist)
Set the SignaturesExist bit.
|
void |
setXFA(PDXFAResource xfa)
Set the XFA resource, this is only used for PDF 1.5+ forms.
|
boolean |
xfaIsDynamic()
This will tell if the AcroForm is a dynamic XFA form.
|
public PDAcroForm(PDDocument doc)
doc - The document that this form is part of.public PDAcroForm(PDDocument doc, COSDictionary form)
doc - The document that this form is part of.form - The existing acroForm.public COSDictionary getCOSObject()
COSObjectablegetCOSObject in interface COSObjectablepublic void importFDF(FDFDocument fdf) throws IOException
fdf - The FDF document to import.IOException - If there is an error doing the import.public FDFDocument exportFDF() throws IOException
IOException - If there is an error when exporting the document.public List<PDField> getFields()
PDNonTerminalField.getChildren().public void setFields(List<PDField> fields)
fields - The fields that are part of the documents root fields.public void setCacheFields(boolean cache)
throws IOException
cache - A boolean telling if we should cache the fields.IOException - If there is an error while caching the fields.public boolean isCachingFields()
public PDField getField(String fullyQualifiedName) throws IOException
fullyQualifiedName - The name of the field to get.IOException - If there is an error getting the field type.public String getDefaultAppearance()
public void setDefaultAppearance(String daValue)
daValue - a string describing the default appearancepublic boolean getNeedAppearances()
public void setNeedAppearances(Boolean value)
value - the value for NeedAppearancespublic PDResources getDefaultResources()
public void setDefaultResources(PDResources dr)
dr - The new default resources.public boolean hasXFA()
public boolean xfaIsDynamic()
public PDXFAResource getXFA()
public void setXFA(PDXFAResource xfa)
xfa - The xfa resource.public int getQ()
public void setQ(int q)
q - The new text justification.public boolean isSignaturesExist()
public void setSignaturesExist(boolean signaturesExist)
signaturesExist - The value for SignaturesExist.public boolean isAppendOnly()
public void setAppendOnly(boolean appendOnly)
appendOnly - The value for AppendOnly.Copyright © 2015–2020 The veraPDF Consortium. All rights reserved.