Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.interactive.form » [javadoc | source]
org.apache.pdfbox.pdmodel.interactive.form
public class: PDAcroForm [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm

All Implemented Interfaces:
    COSObjectable

This class represents the acroform of a PDF document.
Constructor:
 public PDAcroForm(PDDocument doc) 
    Constructor.
    Parameters:
    doc - The document that this form is part of.
 public PDAcroForm(PDDocument doc,
    COSDictionary form) 
    Constructor.
    Parameters:
    doc - The document that this form is part of.
    form - The existing acroForm.
Method from org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm Summary:
exportFDF,   getCOSObject,   getDefaultResources,   getDictionary,   getDocument,   getField,   getFields,   getXFA,   importFDF,   isCachingFields,   setCacheFields,   setDefaultResources,   setFields,   setXFA
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm Detail:
 public FDFDocument exportFDF() throws IOException 
    This will export all FDF form data.
 public COSBase getCOSObject() 
    {@inheritDoc}
 public PDResources getDefaultResources() 
    This will get the default resources for the acro form.
 public COSDictionary getDictionary() 
    This will get the dictionary that this form wraps.
 public PDDocument getDocument() 
    This will get the document associated with this form.
 public PDField getField(String name) throws IOException 
    This will get a field by name, possibly using the cache if setCache is true.
 public List getFields() throws IOException 
    This will return all of the fields in the document. The type will be a org.apache.pdfbox.pdmodel.field.PDField.
 public PDXFA getXFA() 
    Get the XFA resource, the XFA resource is only used for PDF 1.5+ forms.
 public  void importFDF(FDFDocument fdf) throws IOException 
    This method will import an entire FDF document into the PDF document that this acroform is part of.
 public boolean isCachingFields() 
    This will tell if this acro form is caching the fields.
 public  void setCacheFields(boolean cache) throws IOException 
    This will tell this form to cache the fields into a Map structure for fast access via the getField method. The default is false. You would want this to be false if you were changing the COSDictionary behind the scenes, otherwise setting this to true is acceptable.
 public  void setDefaultResources(PDResources dr) 
    This will set the default resources for the acroform.
 public  void setFields(List fields) 
    Set the fields that are part of this AcroForm.
 public  void setXFA(PDXFA xfa) 
    Set the XFA resource, this is only used for PDF 1.5+ forms.