intarsys PDF library API

de.intarsys.pdf.pd
Class PDAcroForm

java.lang.Object
  extended by de.intarsys.pdf.cos.COSBasedObject
      extended by de.intarsys.pdf.pd.PDObject
          extended by de.intarsys.pdf.pd.PDAcroFormNode
              extended by de.intarsys.pdf.pd.PDAcroForm
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDAcroForm
extends PDAcroFormNode

The logical AcroForm hosted in a PDF document.


Nested Class Summary
static class PDAcroForm.MetaClass
          The meta class implementation
 
Field Summary
static COSName DK_CO
          The name of the CalculationOrder entry.
static COSName DK_Fields
          The name of the fields entry.
static COSName DK_NeedAppearances
          The name of the NeedApperances entry.
static COSName DK_SigFlags
          The name of the SignatureFlags entry.
static COSName DK_XFA
          The name of the XFAResources entry.
static PDAcroForm.MetaClass META
          The meta class instance
 
Fields inherited from class de.intarsys.pdf.pd.PDAcroFormNode
DK_DA, DK_DR, DK_Encoding, DK_Font, DK_Q
 
Fields inherited from class de.intarsys.pdf.pd.PDObject
DK_Subtype, DK_Type
 
Method Summary
 void addField(PDAcroFormField field)
          Insert a PDAcroFormField in the receiver node.
 COSObject cosGetXfa()
          The /XFA entry of this.
 PDAcroForm getAcroForm()
          The PDAcroForm for this node.
 List getCalculationOrder()
          A collection containing the PDAcroFormField objects in their calculation order or null if no /C events are defined.
 PDResources getDefaultResources()
          The default resource dictionary.
 List getFields()
          A list of all direct PDAcroFormField instances associated with this object.
 List getGenericChildren()
          Get a collection of PDObject children if the receiver is a node in a hierarchical structure (like page nodes or form fields).
 boolean getNeedAppearances()
          true if /NeedAppearances is set for this form.
 AcroFormSigFlags getSigFlags()
          The flags associated with an AcroForm.
 void invalidateCaches()
          Invalidate all local caches as the base object may have changed.
 boolean isSignatureExists()
          true if this form has a signature field.
 boolean isSigned()
          true if this form has a signed signature field.
 boolean removeField(PDAcroFormField field)
          Remove a PDAcroFormField from the receiver.
 void setDefaultResources(PDResources newResources)
          Assign the default resource dictionary to be used with the form.
 void setGenericParent(PDObject parent)
          Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).
 void setNeedAppearances(boolean newNeedAppearances)
          Set the /NeedAppearances field for the form.
 String toString()
           
 
Methods inherited from class de.intarsys.pdf.pd.PDAcroFormNode
canonicalize, collectLeafFields, getAnnotation, getAnnotations, getDefaultAppearanceContent, getDefaultAppearanceFont, getDefaultAppearanceFontColor, getDefaultAppearanceFontName, getDefaultAppearanceFontSize, getField, getField, getQuadding, setDefaultAppearanceContent, setDefaultAppearanceFont, setDefaultAppearanceFontColor, setDefaultAppearanceFontSize, setQuadding
 
Methods inherited from class de.intarsys.pdf.pd.PDObject
cosGetFieldDescendant, cosGetFieldInheritable, cosGetFieldInherited, cosGetSubtype, cosGetType, cosRemoveFieldInheritable, cosSetFieldInheritable, cosSetSubtype, cosSetType, getDoc, getGenericParent
 
Methods inherited from class de.intarsys.pdf.cos.COSBasedObject
changed, cosGetArray, cosGetDict, cosGetDoc, cosGetField, cosGetObject, cosGetStream, cosHasField, cosRemoveField, cosSetField, getAttribute, getFieldBoolean, getFieldDate, getFieldFixed, getFieldFixedArray, getFieldInt, getFieldMLString, getFieldString, removeAttribute, setAttribute, setFieldBoolean, setFieldFixed, setFieldInt, setFieldMLString, setFieldName, setFieldObject, setFieldString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DK_Fields

public static final COSName DK_Fields
The name of the fields entry.


DK_NeedAppearances

public static final COSName DK_NeedAppearances
The name of the NeedApperances entry.


DK_SigFlags

public static final COSName DK_SigFlags
The name of the SignatureFlags entry.

For a list of possible flags:

See Also:
AcroFormSigFlags

DK_CO

public static final COSName DK_CO
The name of the CalculationOrder entry.


DK_XFA

public static final COSName DK_XFA
The name of the XFAResources entry.


META

public static final PDAcroForm.MetaClass META
The meta class instance

Method Detail

getAcroForm

public PDAcroForm getAcroForm()
Description copied from class: PDAcroFormNode
The PDAcroForm for this node.

Specified by:
getAcroForm in class PDAcroFormNode
Returns:
The PDAcroForm for this node.

setDefaultResources

public void setDefaultResources(PDResources newResources)
Assign the default resource dictionary to be used with the form.

Parameters:
newResources - The new default resource dictionary.

getDefaultResources

public PDResources getDefaultResources()
The default resource dictionary.

With 1.5 this is no longer supported as an entry in field dictionaries, only in the form itself.

Returns:
The default resource dictionary.

getCalculationOrder

public List getCalculationOrder()
A collection containing the PDAcroFormField objects in their calculation order or null if no /C events are defined.

Returns:
A collection containing the PDAcroFormField objects in their calculation order or null if no /C events are defined.

getFields

public List getFields()
A list of all direct PDAcroFormField instances associated with this object.

Returns:
A list of all direct PDAcroFormField instances associated with this object.

getGenericChildren

public List getGenericChildren()
Description copied from class: PDObject
Get a collection of PDObject children if the receiver is a node in a hierarchical structure (like page nodes or form fields).

This enables the generic implementation of inherited field values and so on.

A concrete PDObject implementation supporting inheritance should implement this method.

Overrides:
getGenericChildren in class PDObject
Returns:
A collection of PDObject children if the receiver is a node in a hierarchical structure .

setGenericParent

public void setGenericParent(PDObject parent)
Description copied from class: PDObject
Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

Overrides:
setGenericParent in class PDObject
Parameters:
parent - The new parent object.

setNeedAppearances

public void setNeedAppearances(boolean newNeedAppearances)
Set the /NeedAppearances field for the form. When true, a viewer application is required to re-create the visual appearances for the fields.

Parameters:
newNeedAppearances - The new state for /NewwdAppearances

getNeedAppearances

public boolean getNeedAppearances()
true if /NeedAppearances is set for this form.

Returns:
true if /NeedAppearances is set for this form.

getSigFlags

public AcroFormSigFlags getSigFlags()
The flags associated with an AcroForm.

Returns:
The flags associated with an AcroForm.

addField

public void addField(PDAcroFormField field)
Description copied from class: PDAcroFormNode
Insert a PDAcroFormField in the receiver node.

Specified by:
addField in class PDAcroFormNode
Parameters:
field - The field to be inserted.

removeField

public boolean removeField(PDAcroFormField field)
Description copied from class: PDAcroFormNode
Remove a PDAcroFormField from the receiver.

Specified by:
removeField in class PDAcroFormNode
Parameters:
field - The field to remove.
Returns:
true if field was removed.

toString

public String toString()
Overrides:
toString in class PDObject

invalidateCaches

public void invalidateCaches()
Description copied from class: COSBasedObject
Invalidate all local caches as the base object may have changed.

Overrides:
invalidateCaches in class PDAcroFormNode

cosGetXfa

public COSObject cosGetXfa()
The /XFA entry of this.

Returns:
The /XFA entry of this.

isSigned

public boolean isSigned()
true if this form has a signed signature field.

Returns:
true if this form has a signed signature field.

isSignatureExists

public boolean isSignatureExists()
true if this form has a signature field. This is NOT the same as the flag in the SigFlags entry but may be used to compute this entry.

Returns:
true if this form has a signature field.

intarsys PDF library API

Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.