Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible

public Class PDFTemplateStructure

extends Object
Class Inheritance
Imports
java.awt.geom.AffineTransform, java.util.List, org.apache.pdfbox.cos.COSArray, .COSDictionary, .COSDocument, .COSName, org.apache.pdfbox.pdmodel.PDDocument, .PDPage, .PDResources, org.apache.pdfbox.pdmodel.common.PDRectangle, .PDStream, org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject, org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject, org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary, org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm, .PDField, .PDSignatureField

Structure of PDF document with visible signature.
Author
Vakhtang Koroghlishvili

Field Summary

Modifier and TypeField and Description
private PDAcroForm
private COSDictionary
private List<PDField>
private AffineTransform
private PDAppearanceDictionary
private PDRectangle
private PDFormXObject
private PDResources
private PDStream
private PDImageXObject
private PDFormXObject
private COSName
private PDResources
private PDStream
private COSName
private PDFormXObject
private COSName
private PDResources
private PDStream
private PDPage
private PDSignature
private COSArray
private PDSignatureField
private PDRectangle
private PDDocument
private COSDocument
private COSDictionary

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PDAcroForm

Returns:

the AcroForm
getAcroForm
()

Gets AcroForm

public COSDictionary

Returns:

the AcroForm's dictionary
getAcroFormDictionary
()

Gets Dictionary of AcroForm.

public List<PDField>

Returns:

the AcroForm fields
getAcroFormFields
()

Gets acroFormFields

public AffineTransform

Returns:

the AffineTransform
getAffineTransform
()

Gets AffineTransform

public PDAppearanceDictionary

Returns:

the Appearance Dictionary
getAppearanceDictionary
()

Gets AppearanceDictionary That is /AP entry the appearance dictionary.

public PDRectangle

Returns:

the formatter rectangle
getFormatterRectangle
()

Gets formatter rectangle

public PDFormXObject

Returns:

the holder form
getHolderForm
()

Gets Holder form.

public PDResources

Returns:

the holder form's resources
getHolderFormResources
()

Gets Holder form resources

public PDStream

Returns:

the holder form stream
getHolderFormStream
()

Sets HolderFormStream

public PDImageXObject

Returns:

the image making up the visible signature
getImage
()

Gets the image of visible signature

public PDFormXObject

Returns:

the image form
getImageForm
()

Gets Image form.

public COSName

Returns:

the image form's name
getImageFormName
()

Gets image form name

public PDResources

Returns:

the image form's resources
getImageFormResources
()

Gets image form resources

public PDStream

Returns:

the image form's stream
getImageFormStream
()

Gets Image form stream

public COSName

Returns:

the visible signature's image name
getImageName
()

Gets visible signature image name

public PDFormXObject

Returns:

the inner form
getInnerForm
()

Gets inner form that is in this location: AcroForm/DR/XObject/{holder form name}/Resources/XObject/{inner name} By default inner form name starts with "n".

public COSName

Returns:

the inner forms's name
getInnerFormName
()

Gets name of inner form

public PDResources

Returns:

the inner form's resources
getInnerFormResources
()

Gets inner form Resource

public PDStream

Returns:

the inner form stream
getInnerFormStream
()

Gets Inner form Stream.

public PDPage

Returns:

the page
getPage
()

Returns document page.

public PDSignature

Returns:

the signature
getPdSignature
()

Gets PDSignature

public COSArray

Returns:

the PorocSet array
getProcSet
()

Gets ProcSet Array

public PDSignatureField

Returns:

the signature field
getSignatureField
()

Gets Signature field

public PDRectangle

Returns:

the rectangle for the signature
getSignatureRectangle
()

Gets SignatureRectangle

public PDDocument

Returns:

the template
getTemplate
()

Gets PDDocument template.

public COSDocument

Returns:

the visual signature
getVisualSignature
()

Gets COSDocument of visible Signature.

public COSDictionary

Returns:

the widget dictionary
getWidgetDictionary
()

Gets Widget Dictionary.

public void
setAcroForm(PDAcroForm
the acro form to be used for the signature
acroForm
)

Sets AcroForm

public void
setAcroFormDictionary(COSDictionary
the current acroform dictionary
acroFormDictionary
)

Acroform have its Dictionary, so we here set the Dictionary which is in this location: AcroForm/DR

public void
setAcroFormFields(List<PDField>
a list of acroform fields
acroFormFields
)

Sets acroFormFields

public void
setAffineTransform(AffineTransform
the affine transformation to be used for the signature
affineTransform
)

Sets AffineTransform

public void
setAppearanceDictionary(PDAppearanceDictionary
the appearance dictionary
appearanceDictionary
)

Sets AppearanceDictionary That is /AP entry the appearance dictionary.

public void
setFormatterRectangle(PDRectangle
the rectangle to be used to the formatter
formatterRectangle
)

Sets formatter rectangle

public void
setHolderForm(PDFormXObject
the holder form
holderForm
)

In the structure, form will be contained by XObject in the AcroForm/DR/

public void
setHolderFormResources(PDResources
the resources of the holder form
holderFormResources
)

Sets holder form resources

public void
setHolderFormStream(PDStream
the stream for the holder form
holderFormStream
)

Sets stream of holder form Stream

public void
setImage(PDImageXObject
Image XObject
image
)

Sets the image of visible signature

public void
setImageForm(PDFormXObject
the image form
imageForm
)

Sets Image form.

public void
setImageFormName(COSName
the name of the image form
imageFormName
)

Sets image form name

public void
setImageFormResources(PDResources
the resources of the image form
imageFormResources
)

Sets image form resource

public void
setImageFormStream(PDStream
the stream of the image form
imageFormStream
)

Sets image form stream

public void
setImageName(COSName
the name of the image
imageName
)

Sets visible signature image name

public void
setInnerForm(PDFormXObject
the inner form
innerForm
)

sets inner form to this location: AcroForm/DR/XObject/{holder form name}/Resources/XObject/{destination}

public void
setInnerFormName(COSName
the name of the inner form
innerFormName
)

Sets inner form name

public void
setInnerFormResources(PDResources
the rsesources of the inner form
innerFormResources
)

Sets inner form resource

public void
setInnterFormStream(PDStream
the stream of the inner form
innerFormStream
)

Sets inner form stream

public void
setPage(PDPage
the current page
page
)

Sets document page

public void
setPdSignature(PDSignature
the current PDSignature object
pdSignature
)

Sets PDSignatureField

public void
setProcSet(COSArray
the current ProcSet array
procSet
)

Sets ProcSet Array

public void
setSignatureField(PDSignatureField
the current signature field
signatureField
)

Sets signature field

public void
setSignatureRectangle(PDRectangle
the rectangle to be used for the signature
signatureRectangle
)

Sets SignatureRectangle

public void
setTemplate(PDDocument
the document used as template
template
)

Wets PDDocument template.

public void
setVisualSignature(COSDocument
the visual signature
visualSignature
)

Sets COSDocument of visible Signature.

public void
setWidgetDictionary(COSDictionary
the widget dictionary
widgetDictionary
)

Sets Widget Dictionary.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

acroFormback to summary
private PDAcroForm acroForm
acroFormDictionaryback to summary
private COSDictionary acroFormDictionary
acroFormFieldsback to summary
private List<PDField> acroFormFields
affineTransformback to summary
private AffineTransform affineTransform
appearanceDictionaryback to summary
private PDAppearanceDictionary appearanceDictionary
formatterRectangleback to summary
private PDRectangle formatterRectangle
holderFormback to summary
private PDFormXObject holderForm
holderFormResourcesback to summary
private PDResources holderFormResources
holderFormStreamback to summary
private PDStream holderFormStream
imageback to summary
private PDImageXObject image
imageFormback to summary
private PDFormXObject imageForm
imageFormNameback to summary
private COSName imageFormName
imageFormResourcesback to summary
private PDResources imageFormResources
imageFormStreamback to summary
private PDStream imageFormStream
imageNameback to summary
private COSName imageName
innerFormback to summary
private PDFormXObject innerForm
innerFormNameback to summary
private COSName innerFormName
innerFormResourcesback to summary
private PDResources innerFormResources
innerFormStreamback to summary
private PDStream innerFormStream
pageback to summary
private PDPage page
pdSignatureback to summary
private PDSignature pdSignature
procSetback to summary
private COSArray procSet
signatureFieldback to summary
private PDSignatureField signatureField
signatureRectangleback to summary
private PDRectangle signatureRectangle
templateback to summary
private PDDocument template
visualSignatureback to summary
private COSDocument visualSignature
widgetDictionaryback to summary
private COSDictionary widgetDictionary

Constructor Detail

PDFTemplateStructureback to summary
public PDFTemplateStructure()

Method Detail

getAcroFormback to summary
public PDAcroForm getAcroForm()

Gets AcroForm

Returns:PDAcroForm

the AcroForm

getAcroFormDictionaryback to summary
public COSDictionary getAcroFormDictionary()

Gets Dictionary of AcroForm. That's /DR entry in the AcroForm

Returns:COSDictionary

the AcroForm's dictionary

getAcroFormFieldsback to summary
public List<PDField> getAcroFormFields()

Gets acroFormFields

Returns:List<PDField>

the AcroForm fields

getAffineTransformback to summary
public AffineTransform getAffineTransform()

Gets AffineTransform

Returns:AffineTransform

the AffineTransform

getAppearanceDictionaryback to summary
public PDAppearanceDictionary getAppearanceDictionary()

Gets AppearanceDictionary That is /AP entry the appearance dictionary.

Returns:PDAppearanceDictionary

the Appearance Dictionary

getFormatterRectangleback to summary
public PDRectangle getFormatterRectangle()

Gets formatter rectangle

Returns:PDRectangle

the formatter rectangle

getHolderFormback to summary
public PDFormXObject getHolderForm()

Gets Holder form. That form is here AcroForm/DR/XObject/{holder form name} By default, name stars with FRM. We also add number of form to the name.

Returns:PDFormXObject

the holder form

getHolderFormResourcesback to summary
public PDResources getHolderFormResources()

Gets Holder form resources

Returns:PDResources

the holder form's resources

getHolderFormStreamback to summary
public PDStream getHolderFormStream()

Sets HolderFormStream

Returns:PDStream

the holder form stream

getImageback to summary
public PDImageXObject getImage()

Gets the image of visible signature

Returns:PDImageXObject

the image making up the visible signature

getImageFormback to summary
public PDFormXObject getImageForm()

Gets Image form. Image form is in this structure: /AcroForm/DR/{holder form}/Resources/XObject /{inner form} /Resources/XObject/{image form name}.

Returns:PDFormXObject

the image form

getImageFormNameback to summary
public COSName getImageFormName()

Gets image form name

Returns:COSName

the image form's name

getImageFormResourcesback to summary
public PDResources getImageFormResources()

Gets image form resources

Returns:PDResources

the image form's resources

getImageFormStreamback to summary
public PDStream getImageFormStream()

Gets Image form stream

Returns:PDStream

the image form's stream

getImageNameback to summary
public COSName getImageName()

Gets visible signature image name

Returns:COSName

the visible signature's image name

getInnerFormback to summary
public PDFormXObject getInnerForm()

Gets inner form that is in this location: AcroForm/DR/XObject/{holder form name}/Resources/XObject/{inner name} By default inner form name starts with "n". Then we add number of form to the name.

Returns:PDFormXObject

the inner form

getInnerFormNameback to summary
public COSName getInnerFormName()

Gets name of inner form

Returns:COSName

the inner forms's name

getInnerFormResourcesback to summary
public PDResources getInnerFormResources()

Gets inner form Resource

Returns:PDResources

the inner form's resources

getInnerFormStreamback to summary
public PDStream getInnerFormStream()

Gets Inner form Stream.

Returns:PDStream

the inner form stream

getPageback to summary
public PDPage getPage()

Returns document page.

Returns:PDPage

the page

getPdSignatureback to summary
public PDSignature getPdSignature()

Gets PDSignature

Returns:PDSignature

the signature

getProcSetback to summary
public COSArray getProcSet()

Gets ProcSet Array

Returns:COSArray

the PorocSet array

getSignatureFieldback to summary
public PDSignatureField getSignatureField()

Gets Signature field

Returns:PDSignatureField

the signature field

getSignatureRectangleback to summary
public PDRectangle getSignatureRectangle()

Gets SignatureRectangle

Returns:PDRectangle

the rectangle for the signature

getTemplateback to summary
public PDDocument getTemplate()

Gets PDDocument template. This represents a digital signature that can be attached to a document

Returns:PDDocument

the template

getVisualSignatureback to summary
public COSDocument getVisualSignature()

Gets COSDocument of visible Signature.

Returns:COSDocument

the visual signature

See Also
org.apache.pdfbox.cos.COSDocument
getWidgetDictionaryback to summary
public COSDictionary getWidgetDictionary()

Gets Widget Dictionary.

Returns:COSDictionary

the widget dictionary

setAcroFormback to summary
public void setAcroForm(PDAcroForm acroForm)

Sets AcroForm

Parameters
acroForm:PDAcroForm

the acro form to be used for the signature

setAcroFormDictionaryback to summary
public void setAcroFormDictionary(COSDictionary acroFormDictionary)

Acroform have its Dictionary, so we here set the Dictionary which is in this location: AcroForm/DR

Parameters
acroFormDictionary:COSDictionary

the current acroform dictionary

setAcroFormFieldsback to summary
public void setAcroFormFields(List<PDField> acroFormFields)

Sets acroFormFields

Parameters
acroFormFields:List<PDField>

a list of acroform fields

setAffineTransformback to summary
public void setAffineTransform(AffineTransform affineTransform)

Sets AffineTransform

Parameters
affineTransform:AffineTransform

the affine transformation to be used for the signature

setAppearanceDictionaryback to summary
public void setAppearanceDictionary(PDAppearanceDictionary appearanceDictionary)

Sets AppearanceDictionary That is /AP entry the appearance dictionary.

Parameters
appearanceDictionary:PDAppearanceDictionary

the appearance dictionary

setFormatterRectangleback to summary
public void setFormatterRectangle(PDRectangle formatterRectangle)

Sets formatter rectangle

Parameters
formatterRectangle:PDRectangle

the rectangle to be used to the formatter

setHolderFormback to summary
public void setHolderForm(PDFormXObject holderForm)

In the structure, form will be contained by XObject in the AcroForm/DR/

Parameters
holderForm:PDFormXObject

the holder form

setHolderFormResourcesback to summary
public void setHolderFormResources(PDResources holderFormResources)

Sets holder form resources

Parameters
holderFormResources:PDResources

the resources of the holder form

setHolderFormStreamback to summary
public void setHolderFormStream(PDStream holderFormStream)

Sets stream of holder form Stream

Parameters
holderFormStream:PDStream

the stream for the holder form

setImageback to summary
public void setImage(PDImageXObject image)

Sets the image of visible signature

Parameters
image:PDImageXObject

Image XObject

setImageFormback to summary
public void setImageForm(PDFormXObject imageForm)

Sets Image form. Image form will be in this structure: /AcroForm/DR/{holder form}/Resources/XObject /{inner form} /Resources/XObject/{image form name}. By default we start image form name with "img". Then we add number of image form to the form name. Sets image form

Parameters
imageForm:PDFormXObject

the image form

setImageFormNameback to summary
public void setImageFormName(COSName imageFormName)

Sets image form name

Parameters
imageFormName:COSName

the name of the image form

setImageFormResourcesback to summary
public void setImageFormResources(PDResources imageFormResources)

Sets image form resource

Parameters
imageFormResources:PDResources

the resources of the image form

setImageFormStreamback to summary
public void setImageFormStream(PDStream imageFormStream)

Sets image form stream

Parameters
imageFormStream:PDStream

the stream of the image form

setImageNameback to summary
public void setImageName(COSName imageName)

Sets visible signature image name

Parameters
imageName:COSName

the name of the image

setInnerFormback to summary
public void setInnerForm(PDFormXObject innerForm)

sets inner form to this location: AcroForm/DR/XObject/{holder form name}/Resources/XObject/{destination}

Parameters
innerForm:PDFormXObject

the inner form

setInnerFormNameback to summary
public void setInnerFormName(COSName innerFormName)

Sets inner form name

Parameters
innerFormName:COSName

the name of the inner form

setInnerFormResourcesback to summary
public void setInnerFormResources(PDResources innerFormResources)

Sets inner form resource

Parameters
innerFormResources:PDResources

the rsesources of the inner form

setInnterFormStreamback to summary
public void setInnterFormStream(PDStream innerFormStream)

Sets inner form stream

Parameters
innerFormStream:PDStream

the stream of the inner form

setPageback to summary
public void setPage(PDPage page)

Sets document page

Parameters
page:PDPage

the current page

setPdSignatureback to summary
public void setPdSignature(PDSignature pdSignature)

Sets PDSignatureField

Parameters
pdSignature:PDSignature

the current PDSignature object

setProcSetback to summary
public void setProcSet(COSArray procSet)

Sets ProcSet Array

Parameters
procSet:COSArray

the current ProcSet array

setSignatureFieldback to summary
public void setSignatureField(PDSignatureField signatureField)

Sets signature field

Parameters
signatureField:PDSignatureField

the current signature field

setSignatureRectangleback to summary
public void setSignatureRectangle(PDRectangle signatureRectangle)

Sets SignatureRectangle

Parameters
signatureRectangle:PDRectangle

the rectangle to be used for the signature

setTemplateback to summary
public void setTemplate(PDDocument template)

Wets PDDocument template. This represents a digital signature that can be attached to a document

Parameters
template:PDDocument

the document used as template

setVisualSignatureback to summary
public void setVisualSignature(COSDocument visualSignature)

Sets COSDocument of visible Signature.

Parameters
visualSignature:COSDocument

the visual signature

See Also
org.apache.pdfbox.cos.COSDocument
setWidgetDictionaryback to summary
public void setWidgetDictionary(COSDictionary widgetDictionary)

Sets Widget Dictionary.

Parameters
widgetDictionary:COSDictionary

the widget dictionary