Interface PDFTemplateBuilder
- All Known Implementing Classes:
PDVisibleSigBuilder
public interface PDFTemplateBuilder
That class builds visible signature template which will be added in our PDF document.
- Author:
- Vakhtang Koroghlishvili
-
Method Summary
Modifier and TypeMethodDescriptionvoidcloseTemplate(PDDocument template) Closes templatevoidcreateAcroForm(PDDocument template) Creates Acro forms in the template.voidcreateAcroFormDictionary(PDAcroForm acroForm, PDSignatureField signatureField) Create AcroForm Dictionary.voidcreateAffineTransform(byte[] params) Deprecated.voidcreateAffineTransform(AffineTransform affineTransform) In order to create Affine Transform, using parameters.voidcreateAppearanceDictionary(PDFormXObject holderForm, PDSignatureField signatureField) Creates appearance dictionaryvoidcreateBackgroundLayerForm(PDResources innerFormResource, PDRectangle formatter) Creates the background layer form (n0).voidcreateFormatterRectangle(byte[] params) Deprecated.voidcreateFormatterRectangle(int[] params) An array of four numbers in the form coordinate system, giving the coordinates of the left, bottom, right, and top edges, respectively, of the form XObject?s bounding box.voidcreateHolderForm(PDResources holderFormResources, PDStream holderFormStream, PDRectangle bbox) Creates FormvoidCreates resources of formvoidcreateHolderFormStream(PDDocument template) voidcreateImageForm(PDResources imageFormResources, PDResources innerFormResource, PDStream imageFormStream, PDRectangle bbox, AffineTransform affineTransform, PDImageXObject img) Creates Image formvoidCreate resource of image formvoidcreateImageFormStream(PDDocument template) voidcreateInnerForm(PDResources innerFormResources, PDStream innerFormStream, PDRectangle bbox) voidCreates InnerFormvoidcreateInnerFormStream(PDDocument template) voidcreatePage(PDVisibleSignDesigner properties) Creates specified size page.voidCreates procSetArray of PDF,Text,ImageB,ImageC,ImageI.voidcreateSignature(PDSignatureField pdSignatureField, PDPage page, String signerName) Creates the signature with the given name and assign it to the signature field parameter and assign the page parameter to the widget.voidcreateSignatureField(PDAcroForm acroForm) Creates signature fields.voidcreateSignatureImage(PDDocument template, BufferedImage image) Creates signature image.voidcreateSignatureRectangle(PDSignatureField signatureField, PDVisibleSignDesigner properties) Creates SignatureRectangle.voidcreateTemplate(PDPage page) Creates template using page.voidcreateVisualSignature(PDDocument template) just to create visible signaturevoidcreateWidgetDictionary(PDSignatureField signatureField, PDResources holderFormResources) adds Widget DictionaryvoidinjectAppearanceStreams(PDStream holderFormStream, PDStream innerFormStream, PDStream imageFormStream, COSName imageFormName, COSName imageName, COSName innerFormName, PDVisibleSignDesigner properties) injects appearance streamsvoidinjectProcSetArray(PDFormXObject innerForm, PDPage page, PDResources innerFormResources, PDResources imageFormResources, PDResources holderFormResources, COSArray procSet) Inject procSetArrayvoidinsertInnerFormToHolderResources(PDFormXObject innerForm, PDResources holderFormResources)
-
Method Details
-
createAffineTransform
Deprecated.In order to create Affine Transform, using parameters.- Parameters:
params- parameter values
-
createAffineTransform
In order to create Affine Transform, using parameters.- Parameters:
affineTransform- the transformation
-
createPage
Creates specified size page.- Parameters:
properties- property value
-
createTemplate
Creates template using page.- Parameters:
page- the given page- Throws:
IOException- if something went wrong
-
createAcroForm
Creates Acro forms in the template.- Parameters:
template- the template document
-
createSignatureField
Creates signature fields.- Parameters:
acroForm- the acroform- Throws:
IOException- if something went wrong
-
createSignature
void createSignature(PDSignatureField pdSignatureField, PDPage page, String signerName) throws IOException Creates the signature with the given name and assign it to the signature field parameter and assign the page parameter to the widget.- Parameters:
pdSignatureField- signature filedpage- the given pagesignerName- the name of the person or authority signing the document. According to the PDF specification, this value should be used only when it is not possible to extract the name from the signature.- Throws:
IOException- if something went wrong
-
createAcroFormDictionary
void createAcroFormDictionary(PDAcroForm acroForm, PDSignatureField signatureField) throws IOException Create AcroForm Dictionary.- Parameters:
acroForm- the acroformsignatureField- the signature field- Throws:
IOException- if something went wrong
-
createSignatureRectangle
void createSignatureRectangle(PDSignatureField signatureField, PDVisibleSignDesigner properties) throws IOException Creates SignatureRectangle.- Parameters:
signatureField- the signature fieldproperties- properties- Throws:
IOException- if something went wrong
-
createProcSetArray
void createProcSetArray()Creates procSetArray of PDF,Text,ImageB,ImageC,ImageI. -
createSignatureImage
Creates signature image.- Parameters:
template- template documentimage- signature image- Throws:
IOException- if something went wrong
-
createFormatterRectangle
Deprecated.An array of four numbers in the form coordinate system, giving the coordinates of the left, bottom, right, and top edges, respectively, of the form XObject?s bounding box. These boundaries shall be used to clip the form XObject and to determine its size for caching.- Parameters:
params- parameters
-
createFormatterRectangle
void createFormatterRectangle(int[] params) An array of four numbers in the form coordinate system, giving the coordinates of the left, bottom, right, and top edges, respectively, of the form XObject?s bounding box. These boundaries shall be used to clip the form XObject and to determine its size for caching.- Parameters:
params- parameters
-
createHolderFormStream
- Parameters:
template- template document
-
createHolderFormResources
void createHolderFormResources()Creates resources of form -
createHolderForm
Creates Form- Parameters:
holderFormResources- holder form resourcesholderFormStream- holder streambbox- bounding box
-
createAppearanceDictionary
void createAppearanceDictionary(PDFormXObject holderForm, PDSignatureField signatureField) throws IOException Creates appearance dictionary- Parameters:
holderForm- holder XObjectsignatureField- the signature field- Throws:
IOException- if something went wrong
-
createInnerFormStream
- Parameters:
template- template document
-
createInnerFormResource
void createInnerFormResource()Creates InnerForm -
createInnerForm
- Parameters:
innerFormResources- inner form resourcesinnerFormStream- inner form streambbox- bounding box
-
insertInnerFormToHolderResources
- Parameters:
innerForm- inner form XObjectholderFormResources- holder form resources
-
createImageFormStream
- Parameters:
template- template document
-
createImageFormResources
void createImageFormResources()Create resource of image form -
createImageForm
void createImageForm(PDResources imageFormResources, PDResources innerFormResource, PDStream imageFormStream, PDRectangle bbox, AffineTransform affineTransform, PDImageXObject img) throws IOException Creates Image form- Parameters:
imageFormResources- image form resourcesinnerFormResource- inner form resourcesimageFormStream- image from streambbox- bounding boxaffineTransform- transformationimg- ImageXObject- Throws:
IOException- if something went wrong
-
createBackgroundLayerForm
void createBackgroundLayerForm(PDResources innerFormResource, PDRectangle formatter) throws IOException Creates the background layer form (n0).- Parameters:
innerFormResource- inner acroform resourcesformatter- rectangle of the formatter- Throws:
IOException- if something went wrong
-
injectProcSetArray
void injectProcSetArray(PDFormXObject innerForm, PDPage page, PDResources innerFormResources, PDResources imageFormResources, PDResources holderFormResources, COSArray procSet) Inject procSetArray- Parameters:
innerForm- inner formpage- the given pageinnerFormResources- inner form resourcesimageFormResources- image form resourcesholderFormResources- holder form resourcesprocSet- procset values
-
injectAppearanceStreams
void injectAppearanceStreams(PDStream holderFormStream, PDStream innerFormStream, PDStream imageFormStream, COSName imageFormName, COSName imageName, COSName innerFormName, PDVisibleSignDesigner properties) throws IOException injects appearance streams- Parameters:
holderFormStream- holder form streaminnerFormStream- inner form streamimageFormStream- image form streamimageFormName- image form nameimageName- image nameinnerFormName- inner form nameproperties- property values- Throws:
IOException- if something went wrong
-
createVisualSignature
just to create visible signature- Parameters:
template- template document
-
createWidgetDictionary
void createWidgetDictionary(PDSignatureField signatureField, PDResources holderFormResources) throws IOException adds Widget Dictionary- Parameters:
signatureField- the signature fieldholderFormResources- holder form resources- Throws:
IOException- if something went wrong
-
getStructure
PDFTemplateStructure getStructure()- Returns:
- - PDF template Structure
-
closeTemplate
Closes template- Parameters:
template- template document- Throws:
IOException- if something went wrong
-
createAffineTransform(java.awt.geom.AffineTransform)