Class PDVisibleSignDesigner
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSignDesigner
That class is in order to build your
visible signature design. Because of
this is builder, instead of setParam()
we use param() methods.
-
Constructor Summary
ConstructorsConstructorDescriptionPDVisibleSignDesigner(InputStream originalDocumenStream, InputStream imageStream, int page) PDVisibleSignDesigner(String documentPath, InputStream imageStream, int page) PDVisibleSignDesigner(PDDocument doc, InputStream imageStream, int page) -
Method Summary
Modifier and TypeMethodDescriptionaffineTransformParams(byte[] affineTransformParams) coordinates(float x, float y) formaterRectangleParams(byte[] formaterRectangleParams) sets formatter PDRectangle;byte[]byte[]floatfloatget image size in percentsfloatfloatreturns visible signature textprotected floatfloatgetWidth()floatgetxAxis()floatgetyAxis()height(float signatureImgHeight) voidimageSizeInPercents(float imageSizeInPercents) pageWidth(float pageWidth) signatureFieldName(String signatureFieldName) signatureImage(String path) signatureText(String signatureText) width(float signatureImgWidth) xAxis(float xAxis) yAxis(float yAxis) zoom(float percent) zoom signature image with some percent.
-
Constructor Details
-
PDVisibleSignDesigner
public PDVisibleSignDesigner(InputStream originalDocumenStream, InputStream imageStream, int page) throws IOException - Parameters:
originalDocumenStream-imageStream- stream of JPEG imagepage- the 1-based page number for which the page size should be calculated.- Throws:
IOException
-
PDVisibleSignDesigner
public PDVisibleSignDesigner(String documentPath, InputStream imageStream, int page) throws IOException - Parameters:
documentPath- path of your pdf documentimageStream- stream of JPEG imagepage- the 1-based page number for which the page size should be calculated.- Throws:
IOException
-
PDVisibleSignDesigner
- Parameters:
doc- Already created PDDocument of your PDF documentimageStream- stream of JPEG imagepage- the 1-based page number for which the page size should be calculated.- Throws:
IOException- If we can't read, flush, or can't close stream
-
-
Method Details
-
signatureImage
- Parameters:
path- JPEG image location- Returns:
- Visible signature configuration object
- Throws:
IOException
-
zoom
zoom signature image with some percent.- Parameters:
percent- the percentage for zooming the image.- Returns:
- Visible Signature Configuration Object
-
coordinates
- Parameters:
x- the x coordinatey- the y coordinate- Returns:
- Visible Signature Configuration Object
-
getxAxis
public float getxAxis()- Returns:
- xAxis - gets x coordinates
-
xAxis
- Parameters:
xAxis- - x coordinate- Returns:
- Visible Signature Configuration Object
-
getyAxis
public float getyAxis()- Returns:
- yAxis
-
yAxis
- Parameters:
yAxis-- Returns:
- Visible Signature Configuration Object
-
getWidth
public float getWidth()- Returns:
- signature image width
-
width
- Parameters:
signatureImgWidth- the signature image width- Returns:
- Visible Signature Configuration Object
-
getHeight
public float getHeight()- Returns:
- signature image height
-
height
- Parameters:
signatureImgHeight- the signature image Height- Returns:
- Visible Signature Configuration Object
-
getTemplateHeight
protected float getTemplateHeight()- Returns:
- template height
-
getSignatureFieldName
- Returns:
- signature field name
-
signatureFieldName
- Parameters:
signatureFieldName-- Returns:
- Visible Signature Configuration Object
-
getImageStream
- Returns:
- JPEG image stream
-
getAffineTransformParams
public byte[] getAffineTransformParams()- Returns:
- Affine Transform parameters of for PDF Matrix
-
affineTransformParams
- Parameters:
affineTransformParams-- Returns:
- Visible Signature Configuration Object
-
getFormaterRectangleParams
public byte[] getFormaterRectangleParams()- Returns:
- formatter PDRectanle parameters
-
formaterRectangleParams
sets formatter PDRectangle;- Parameters:
formaterRectangleParams-- Returns:
- Visible Signature Configuration Object
-
getPageWidth
public float getPageWidth()- Returns:
- page width
-
pageWidth
- Parameters:
pageWidth- the pageWidth- Returns:
- Visible Signature Configuration Object
-
getPageHeight
public float getPageHeight()- Returns:
- page height
-
getImageSizeInPercents
public float getImageSizeInPercents()get image size in percents- Returns:
- image size in percent.
-
imageSizeInPercents
public void imageSizeInPercents(float imageSizeInPercents) - Parameters:
imageSizeInPercents-
-
getSignatureText
returns visible signature text- Returns:
- visible signature text.
-
signatureText
- Parameters:
signatureText- - adds the text on visible signature- Returns:
- Visible Signature Configuration Object
-