public class PDVisibleSignDesigner extends Object
| Constructor and Description |
|---|
PDVisibleSignDesigner(InputStream imageStream)
Constructor usable for signing existing signature fields.
|
PDVisibleSignDesigner(PDDocument document,
BufferedImage image,
int page)
Constructor.
|
PDVisibleSignDesigner(PDDocument document,
InputStream imageStream,
int page)
Constructor.
|
PDVisibleSignDesigner(org.apache.pdfbox.io.RandomAccessRead documentSource,
BufferedImage image,
int page)
Constructor.
|
PDVisibleSignDesigner(org.apache.pdfbox.io.RandomAccessRead documentSource,
InputStream imageStream,
int page)
Constructor.
|
PDVisibleSignDesigner(String filename,
BufferedImage image,
int page)
Constructor.
|
PDVisibleSignDesigner(String filename,
InputStream imageStream,
int page)
Constructor.
|
public PDVisibleSignDesigner(String filename, InputStream imageStream, int page) throws IOException
filename - Path of the PDF fileimageStream - image as a streampage - The 1-based page number for which the page size should be calculated.IOException - if the new instance of PDVisibleSignDesigner could not be createdpublic PDVisibleSignDesigner(org.apache.pdfbox.io.RandomAccessRead documentSource,
InputStream imageStream,
int page)
throws IOException
documentSource - Original PDF document as RandomAccessReadimageStream - Image as a streampage - The 1-based page number for which the page size should be calculated.IOException - if the new instance of PDVisibleSignDesigner could not be createdpublic PDVisibleSignDesigner(PDDocument document, InputStream imageStream, int page) throws IOException
document - Already created PDDocument of your PDF document.imageStream - Image as a stream.page - The 1-based page number for which the page size should be calculated.IOException - If we can't read, flush, or can't close stream.public PDVisibleSignDesigner(String filename, BufferedImage image, int page) throws IOException
filename - Path of the PDF fileimage - the image to be used for the visible signaturepage - The 1-based page number for which the page size should be calculated.IOException - if the new instance of PDVisibleSignDesigner could not be createdpublic PDVisibleSignDesigner(org.apache.pdfbox.io.RandomAccessRead documentSource,
BufferedImage image,
int page)
throws IOException
documentSource - Original PDF document as RandomAccessReadimage - the image to be used for the visible signaturepage - The 1-based page number for which the page size should be calculated.IOException - if the new instance of PDVisibleSignDesigner could not be createdpublic PDVisibleSignDesigner(PDDocument document, BufferedImage image, int page)
document - Already created PDDocument of your PDF document.image - the image to be used for the visible signaturepage - The 1-based page number for which the page size should be calculated.public PDVisibleSignDesigner(InputStream imageStream) throws IOException
imageStream - image as a streamIOException - if the new instance of PDVisibleSignDesigner could not be createdpublic PDVisibleSignDesigner adjustForRotation()
public PDVisibleSignDesigner signatureImage(String path) throws IOException
path - Path of the image file.IOException - if the image for the signature could not be setpublic PDVisibleSignDesigner zoom(float percent)
percent - increase (positive value) or decrease (negative value) image with x percent.public PDVisibleSignDesigner coordinates(float x, float y)
x - - x coordinatey - - y coordinatepublic float getxAxis()
public PDVisibleSignDesigner xAxis(float xAxis)
xAxis - - x coordinatepublic float getyAxis()
public PDVisibleSignDesigner yAxis(float yAxis)
yAxis - y coordinatepublic float getWidth()
public PDVisibleSignDesigner width(float width)
width - signature image widthpublic float getHeight()
public PDVisibleSignDesigner height(float height)
height - signature image heightprotected float getTemplateHeight()
public String getSignatureFieldName()
public PDVisibleSignDesigner signatureFieldName(String signatureFieldName)
signatureFieldName - the name of the signature fieldpublic BufferedImage getImage()
public AffineTransform getTransform()
public PDVisibleSignDesigner transform(AffineTransform affineTransform)
affineTransform - the affine transformationpublic int[] getFormatterRectangleParameters()
public PDVisibleSignDesigner formatterRectangleParameters(int[] formatterRectangleParameters)
formatterRectangleParameters - rectangle parameter of the formatterpublic float getPageWidth()
public PDVisibleSignDesigner pageWidth(float pageWidth)
pageWidth - pageWidthpublic float getPageHeight()
public float getImageSizeInPercents()
public void imageSizeInPercents(float imageSizeInPercents)
imageSizeInPercents - image size in percentspublic String getSignatureText()
public PDVisibleSignDesigner signatureText(String signatureText)
signatureText - - adds the text on visible signatureCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.