Class PDFTemplateStructure
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDFTemplateStructure
Structure of PDF document with visible signature
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets AcroformGets Dictionary of AcroForm.Gets acroFormFieldsGets AffineTransformGets AppearanceDictionary That is /AP entry the appearance dictionary.Gets formatter rectangleGets Holder form.Gets Holder form resourcesSets HolderFormStreamGets Image form.Gets image form nameGets image form resourcesGets Image form streamGets visible signature image nameGets 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".Gets name of inner formGets inner form ResourceGets Inner form Stream.Gets the image of visible signaturegetPage()Returns document page.Gets PDSignatureGets ProcSet ArrayGets Signature fieldGets SignatureRectangleGets PDDocument template.Gets AP of the created templateGets COSDocument of visible Signature.Gets Widget Dictionary.voidsetAcroForm(PDAcroForm acroForm) Sets AcroformvoidsetAcroFormDictionary(COSDictionary acroFormDictionary) Acroform have its Dictionary, so we here set the Dictionary which is in this location: AcroForm/DRvoidsetAcroFormFields(List<PDField> acroFormFields) Sets acroFormFieldsvoidsetAffineTransform(AffineTransform affineTransform) Sets AffineTransformvoidsetAppearanceDictionary(PDAppearanceDictionary appearanceDictionary) Sets AppearanceDictionary That is /AP entry the appearance dictionary.voidsetFormaterRectangle(PDRectangle formaterRectangle) Sets formatter rectanglevoidsetHolderForm(PDXObjectForm holderForm) In the structure, form will be contained by XObject in the AcroForm/DR/voidsetHolderFormResources(PDResources holderFormResources) Sets holder form resourcesvoidsetHolderFormStream(PDStream holderFormStream) Sets stream of holder form StreamvoidsetImageForm(PDXObjectForm imageForm) Sets Image form.voidsetImageFormName(String imageFormName) Sets image form namevoidsetImageFormResources(PDResources imageFormResources) Sets image form resourcevoidsetImageFormStream(PDStream imageFormStream) Sets image form streamvoidsetImageName(String imageName) Sets visible signature image namevoidsetInnerForm(PDXObjectForm innerForm) sets inner form to this location: AcroForm/DR/XObject/{holder form name}/Resources/XObject/{destination}voidsetInnerFormName(String innerFormName) Sets inner form namevoidsetInnerFormResources(PDResources innerFormResources) Sets inner form resourcevoidsetInnterFormStream(PDStream innterFormStream) Sets inner form streamvoidsetJpedImage(PDJpeg jpedImage) Sets the image of visible signaturevoidSets document pagevoidsetPdSignature(PDSignature pdSignature) Sets PDSignaturevoidsetProcSet(COSArray procSet) Sets ProcSet ArrayvoidsetSignatureField(PDSignatureField signatureField) Sets signature fieldvoidsetSignatureRectangle(PDRectangle singatureRectangle) Sets SignatureRectanglevoidsetTemplate(PDDocument template) Wets PDDocument template.voidsetVisualSignature(COSDocument visualSignature) Sets COSDocument of visible Signature.voidsetWidgetDictionary(COSDictionary widgetDictionary) Sets Widget Dictionary.
-
Constructor Details
-
PDFTemplateStructure
public PDFTemplateStructure()
-
-
Method Details
-
getPage
Returns document page.- Returns:
- the document page.
-
setPage
Sets document page- Parameters:
page-
-
getTemplate
Gets PDDocument template. This represents a digital signature that can be attached to a document- Returns:
- the template to be used.
-
setTemplate
Wets PDDocument template. This represents a digital signature that can be attached to a document- Parameters:
template-
-
getAcroForm
Gets Acroform- Returns:
- the documents AcroForm.
-
setAcroForm
Sets Acroform- Parameters:
acroForm-
-
getSignatureField
Gets Signature field- Returns:
- the signature field to be used.
-
setSignatureField
Sets signature field- Parameters:
signatureField-
-
getPdSignature
Gets PDSignature- Returns:
- the signature object.
-
setPdSignature
Sets PDSignature- Parameters:
pdSignature-
-
getAcroFormDictionary
Gets Dictionary of AcroForm. Thats /DR entry in the AcroForm- Returns:
- the AcroForms dictionary object.
-
setAcroFormDictionary
Acroform have its Dictionary, so we here set the Dictionary which is in this location: AcroForm/DR- Parameters:
acroFormDictionary-
-
getSingatureRectangle
Gets SignatureRectangle- Returns:
- the signatures rectangle.
-
setSignatureRectangle
Sets SignatureRectangle- Parameters:
singatureRectangle-
-
getAffineTransform
Gets AffineTransform- Returns:
- the AffineTransform
-
setAffineTransform
Sets AffineTransform- Parameters:
affineTransform-
-
getProcSet
Gets ProcSet Array- Returns:
- the proc set array
-
setProcSet
Sets ProcSet Array- Parameters:
procSet-
-
getJpedImage
Gets the image of visible signature- Returns:
- the image used for a visible signature.
-
setJpedImage
Sets the image of visible signature- Parameters:
jpedImage-
-
getFormaterRectangle
Gets formatter rectangle- Returns:
- the rectangle used by the formatter.
-
setFormaterRectangle
Sets formatter rectangle- Parameters:
formaterRectangle-
-
getHolderFormStream
Sets HolderFormStream- Returns:
- the form stream of the holder.
-
setHolderFormStream
Sets stream of holder form Stream- Parameters:
holderFormStream-
-
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:
- the holder form
-
setHolderForm
In the structure, form will be contained by XObject in the AcroForm/DR/- Parameters:
holderForm-
-
getHolderFormResources
Gets Holder form resources- Returns:
- the holder forms resources.
-
setHolderFormResources
Sets holder form resources- Parameters:
holderFormResources-
-
getAppearanceDictionary
Gets AppearanceDictionary That is /AP entry the appearance dictionary.- Returns:
- the appearance directory.
-
setAppearanceDictionary
Sets AppearanceDictionary That is /AP entry the appearance dictionary.- Parameters:
appearanceDictionary-
-
getInnterFormStream
Gets Inner form Stream.- Returns:
- the inner form's stream.
-
setInnterFormStream
Sets inner form stream- Parameters:
innterFormStream-
-
getInnerFormResources
Gets inner form Resource- Returns:
- the inner form's resources.
-
setInnerFormResources
Sets inner form resource- Parameters:
innerFormResources-
-
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:
- the inner form.
-
setInnerForm
sets inner form to this location: AcroForm/DR/XObject/{holder form name}/Resources/XObject/{destination}- Parameters:
innerForm-
-
getInnerFormName
Gets name of inner form- Returns:
- the inner form's name.
-
setInnerFormName
Sets inner form name- Parameters:
innerFormName-
-
getImageFormStream
Gets Image form stream- Returns:
- the inner form's stream.
-
setImageFormStream
Sets image form stream- Parameters:
imageFormStream-
-
getImageFormResources
Gets image form resources- Returns:
- the image form's resources.
-
setImageFormResources
Sets image form resource- Parameters:
imageFormResources-
-
getImageForm
Gets Image form. Image form is in this structure: /AcroForm/DR/{holder form}/Resources/XObject /{inner form} /Resources/XObject/{image form name}.- Returns:
- the image form.
-
setImageForm
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-
-
getImageFormName
Gets image form name- Returns:
- the image form's name.
-
setImageFormName
Sets image form name- Parameters:
imageFormName-
-
getImageName
Gets visible signature image name- Returns:
- the visible signature image's name.
-
setImageName
Sets visible signature image name- Parameters:
imageName-
-
getVisualSignature
Gets COSDocument of visible Signature.- Returns:
- the document representing the visual signature.
- See Also:
-
setVisualSignature
Sets COSDocument of visible Signature.- Parameters:
visualSignature-- See Also:
-
getAcroFormFields
Gets acroFormFields- Returns:
- the fields within the AcroForm.
-
setAcroFormFields
Sets acroFormFields- Parameters:
acroFormFields-
-
getTemplateAppearanceStream
Gets AP of the created template- Returns:
- the apperance stream of the created template.
- Throws:
IOExceptionCOSVisitorException
-
getWidgetDictionary
Gets Widget Dictionary.PDField- Returns:
- the dictionary representing the widget.
- See Also:
-
setWidgetDictionary
Sets Widget Dictionary.PDField- Parameters:
widgetDictionary-- See Also:
-