public class PDVisibleSignDesigner extends Object
Constructor and Description |
---|
PDVisibleSignDesigner(InputStream imageStream)
Constructor usable for signing existing signature fields.
|
PDVisibleSignDesigner(InputStream documentStream,
BufferedImage image,
int page)
Constructor.
|
PDVisibleSignDesigner(InputStream documentStream,
InputStream imageStream,
int page)
Constructor.
|
PDVisibleSignDesigner(PDDocument document,
BufferedImage image,
int page)
Constructor.
|
PDVisibleSignDesigner(PDDocument document,
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
public PDVisibleSignDesigner(InputStream documentStream, InputStream imageStream, int page) throws IOException
documentStream
- Original PDF document as streamimageStream
- Image as a streampage
- The 1-based page number for which the page size should be calculated.IOException
public 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
- page
- The 1-based page number for which the page size should be calculated.IOException
public PDVisibleSignDesigner(InputStream documentStream, BufferedImage image, int page) throws IOException
documentStream
- Original PDF document as streamimage
- page
- The 1-based page number for which the page size should be calculated.IOException
public PDVisibleSignDesigner(PDDocument document, BufferedImage image, int page)
document
- Already created PDDocument of your PDF document.image
- page
- The 1-based page number for which the page size should be calculated.public PDVisibleSignDesigner(InputStream imageStream) throws IOException
imageStream
- image as a streamIOException
public PDVisibleSignDesigner adjustForRotation()
public PDVisibleSignDesigner signatureImage(String path) throws IOException
path
- Path of the image file.IOException
public 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
- public 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
- public BufferedImage getImage()
@Deprecated public byte[] getAffineTransformParams()
getTransform()
.public AffineTransform getTransform()
@Deprecated public PDVisibleSignDesigner affineTransformParams(byte[] affineTransformParams)
transform(java.awt.geom.AffineTransform)
.affineTransformParams
- public PDVisibleSignDesigner transform(AffineTransform affineTransform)
affineTransform
- @Deprecated public byte[] getFormatterRectangleParams()
getFormatterRectangleParameters()
public int[] getFormatterRectangleParameters()
@Deprecated public PDVisibleSignDesigner formatterRectangleParams(byte[] formatterRectangleParams)
formatterRectangleParameters(int[])
formatterRectangleParams
- public PDVisibleSignDesigner formatterRectangleParameters(int[] formatterRectangleParameters)
formatterRectangleParameters
- public float getPageWidth()
public PDVisibleSignDesigner pageWidth(float pageWidth)
pageWidth
- pageWidthpublic float getPageHeight()
public float getImageSizeInPercents()
public void imageSizeInPercents(float imageSizeInPercents)
imageSizeInPercents
- public String getSignatureText()
public PDVisibleSignDesigner signatureText(String signatureText)
signatureText
- - adds the text on visible signatureCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.