Package eu.europa.esig.dss.pades
Class SignatureImageParameters
java.lang.Object
eu.europa.esig.dss.pades.SignatureImageParameters
- All Implemented Interfaces:
Serializable
public class SignatureImageParameters extends Object implements Serializable
Parameters for a visible signature creation
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description SignatureImageParameters() -
Method Summary
Modifier and Type Method Description ColorgetBackgroundColor()Returns a specified background color for the signature fieldIntegergetDpi()Returns a defined DPI value Note: can be nullSignatureFieldParametersgetFieldParameters()ReturnsSignatureFieldParametersDSSDocumentgetImage()Returns aDSSDocumentimage defined for displaying on the signature fieldVisualSignatureRotationgetRotation()Returns rotation value for a signature fieldSignatureImageTextParametersgetTextParameters()Returns text parametersVisualSignatureAlignmentHorizontalgetVisualSignatureAlignmentHorizontal()Returns a horizontal alignment value of the signature fieldVisualSignatureAlignmentVerticalgetVisualSignatureAlignmentVertical()Returns a vertical alignment value of the signature fieldintgetZoom()Returns the defined Zoom value in percentagebooleanisEmpty()Checks if theSignatureImageParametersis empty (no image or text parameters are defined)voidsetAlignmentHorizontal(VisualSignatureAlignmentHorizontal alignmentHorizontal)Sets a horizontal alignment respectively to a page of the signature fieldvoidsetAlignmentVertical(VisualSignatureAlignmentVertical alignmentVertical)Sets a vertical alignment respectively to a page of the signature fieldvoidsetBackgroundColor(Color backgroundColor)Sets the background color for the signature fieldvoidsetDpi(Integer dpi)Sets an expected DPI value.voidsetFieldParameters(SignatureFieldParameters fieldParameters)SetsSignatureFieldParameters, like signature field position and dimensionsvoidsetHeight(int height)Deprecated.voidsetImage(DSSDocument image)Allows to set a custom image to display on a signature fieldvoidsetPage(int page)Deprecated.voidsetRotation(VisualSignatureRotation rotation)Sets a rotation value for the signature field.voidsetTextParameters(SignatureImageTextParameters textParameters)Sets text parametersvoidsetWidth(int width)Deprecated.voidsetxAxis(float originX)Deprecated.voidsetyAxis(float originY)Deprecated.voidsetZoom(int zoom)Defines the signature field zoom in percentage (default value = 100)StringtoString()
-
Constructor Details
-
SignatureImageParameters
public SignatureImageParameters()
-
-
Method Details
-
getImage
Returns aDSSDocumentimage defined for displaying on the signature field- Returns:
DSSDocumentimage
-
setImage
Allows to set a custom image to display on a signature field- Parameters:
image-DSSDocument
-
getFieldParameters
ReturnsSignatureFieldParameters- Returns:
SignatureFieldParameters
-
setFieldParameters
SetsSignatureFieldParameters, like signature field position and dimensions- Parameters:
fieldParameters-SignatureFieldParameters
-
setxAxis
Deprecated.Allows specifying of an absolute margin for the signature field by X axis Deprecated. UsegetFieldParameters().setOriginX(originX)method- Parameters:
originX-floatmargin
-
setyAxis
Deprecated.Allows specifying of an absolute margin for the signature field by Y axis Deprecated. UsegetFieldParameters().setOriginY(originY)method- Parameters:
originY-floatmargin
-
setPage
Deprecated.Defines a number of page in the document where the signature field must be placed. The counting of pages starts from 1 (the first page) (default value = 1) NOTE: the page must exist in the document! Deprecated. UsegetFieldParameters().setPage(page)method- Parameters:
page-intpage number
-
setWidth
Deprecated.Defines a custom width for the signature field in pixels Deprecated. UsegetFieldParameters().setWidth(width)method- Parameters:
width-intwidth value
-
setHeight
Deprecated.Defines a custom height for the signature field in pixels Deprecated. UsegetFieldParameters().setHeight(height)method- Parameters:
height-intheight value
-
getZoom
public int getZoom()Returns the defined Zoom value in percentage- Returns:
intzoom
-
setZoom
public void setZoom(int zoom)Defines the signature field zoom in percentage (default value = 100)- Parameters:
zoom-intzoom value
-
getBackgroundColor
Returns a specified background color for the signature field- Returns:
Colorbackground color
-
setBackgroundColor
Sets the background color for the signature field- Parameters:
backgroundColor-Colorto set
-
getDpi
Returns a defined DPI value Note: can be null- Returns:
Integerdpi value
-
setDpi
Sets an expected DPI value. If NULL the default dpi of the provided image is applied. Note: images with a lower DPI will take more space on a PDF page- Parameters:
dpi-Integerdpi value
-
getTextParameters
Returns text parameters- Returns:
SignatureImageTextParameters
-
setTextParameters
Sets text parameters- Parameters:
textParameters-SignatureImageTextParameters
-
getRotation
Returns rotation value for a signature field- Returns:
VisualSignatureRotation
-
setRotation
Sets a rotation value for the signature field.- Parameters:
rotation-VisualSignatureRotation. The following values can be used: NONE (DEFAULT value. No rotation is applied. The origin of coordinates begins from the top left corner of a page); AUTOMATIC (Rotates a signature field respectively to the page's rotation. Rotates the signature field on the same value as a defined in a PDF page); ROTATE_90 (Rotates a signature field for a 90° clockwise. Coordinates' origin begins from top right page corner); ROTATE_180 (Rotates a signature field for a 180° clockwise. Coordinates' origin begins from the bottom right page corner); ROTATE_270 (Rotates a signature field for a 270° clockwise. Coordinates' origin begins from the bottom left page corner).
-
getVisualSignatureAlignmentHorizontal
Returns a horizontal alignment value of the signature field- Returns:
VisualSignatureAlignmentHorizontal
-
setAlignmentHorizontal
Sets a horizontal alignment respectively to a page of the signature field- Parameters:
alignmentHorizontal-VisualSignatureAlignmentHorizontal
-
getVisualSignatureAlignmentVertical
Returns a vertical alignment value of the signature field- Returns:
VisualSignatureAlignmentVertical
-
setAlignmentVertical
Sets a vertical alignment respectively to a page of the signature field- Parameters:
alignmentVertical-VisualSignatureAlignmentVertical
-
isEmpty
public boolean isEmpty()Checks if theSignatureImageParametersis empty (no image or text parameters are defined)- Returns:
- TRUE if the parameters are empty, FALSE otherwise
-
toString
-