Interface PDFTemplateBuilder
-
- All Known Implementing Classes:
PDVisibleSigBuilder
public interface PDFTemplateBuilderThat class builds visible signature template which will be added in our PDF document.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidcloseTemplate(PDDocument template)Closes templatevoidcreateAcroForm(PDDocument template)Creates Acro forms in the template.voidcreateAcroFormDictionary(PDAcroForm acroForm, PDSignatureField signatureField)Create AcroForm Dictionary.voidcreateAffineTransform(byte[] params)voidcreateAffineTransform(AffineTransform affineTransform)In order to create Affine Transform, using parameters.voidcreateAppearanceDictionary(PDFormXObject holderForml, 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 FormvoidcreateHolderFormResources()Creates resources of formvoidcreateHolderFormStream(PDDocument template)voidcreateImageForm(PDResources imageFormResources, PDResources innerFormResource, PDStream imageFormStream, PDRectangle bbox, AffineTransform affineTransform, PDImageXObject img)Creates Image formvoidcreateImageFormResources()Create resource of image formvoidcreateImageFormStream(PDDocument template)voidcreateInnerForm(PDResources innerFormResources, PDStream innerFormStream, PDRectangle bbox)voidcreateInnerFormResource()Creates InnerFormvoidcreateInnerFormStream(PDDocument template)voidcreatePage(PDVisibleSignDesigner properties)Creates specified size page.voidcreateProcSetArray()Creates 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, Bitmap 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 DictionaryPDFTemplateStructuregetStructure()voidinjectAppearanceStreams(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 Detail
-
createAffineTransform
@Deprecated void createAffineTransform(byte[] params)
In order to create Affine Transform, using parameters.- Parameters:
params- parameter values
-
createAffineTransform
void createAffineTransform(AffineTransform affineTransform)
In order to create Affine Transform, using parameters.- Parameters:
affineTransform- the transformation
-
createPage
void createPage(PDVisibleSignDesigner properties)
Creates specified size page.- Parameters:
properties- property value
-
createTemplate
void createTemplate(PDPage page) throws IOException
Creates template using page.- Parameters:
page- the given page- Throws:
IOException- if something went wrong
-
createAcroForm
void createAcroForm(PDDocument template)
Creates Acro forms in the template.- Parameters:
template- the template document
-
createSignatureField
void createSignatureField(PDAcroForm acroForm) throws IOException
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
void createSignatureImage(PDDocument template, Bitmap image) throws IOException
Creates signature image.- Parameters:
template- template documentimage- signature image- Throws:
IOException- if something went wrong
-
createFormatterRectangle
@Deprecated void createFormatterRectangle(byte[] params)
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
void createHolderFormStream(PDDocument template)
- Parameters:
template- template document
-
createHolderFormResources
void createHolderFormResources()
Creates resources of form
-
createHolderForm
void createHolderForm(PDResources holderFormResources, PDStream holderFormStream, PDRectangle bbox)
Creates Form- Parameters:
holderFormResources- holder form resourcesholderFormStream- holder streambbox- bounding box
-
createAppearanceDictionary
void createAppearanceDictionary(PDFormXObject holderForml, PDSignatureField signatureField) throws IOException
Creates appearance dictionary- Parameters:
holderForml- holder XObjectsignatureField- the signature field- Throws:
IOException- if something went wrong
-
createInnerFormStream
void createInnerFormStream(PDDocument template)
- Parameters:
template- template document
-
createInnerFormResource
void createInnerFormResource()
Creates InnerForm
-
createInnerForm
void createInnerForm(PDResources innerFormResources, PDStream innerFormStream, PDRectangle bbox)
- Parameters:
innerFormResources- inner form resourcesinnerFormStream- inner form streambbox- bounding box
-
insertInnerFormToHolderResources
void insertInnerFormToHolderResources(PDFormXObject innerForm, PDResources holderFormResources)
- Parameters:
innerForm- inner form XObjectholderFormResources- holder form resources
-
createImageFormStream
void createImageFormStream(PDDocument template)
- 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
void createVisualSignature(PDDocument template)
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
void closeTemplate(PDDocument template) throws IOException
Closes template- Parameters:
template- template document- Throws:
IOException- if something went wrong
-
-