Package com.itextpdf.forms.form.element
Class SignatureFieldAppearance
java.lang.Object
com.itextpdf.commons.actions.sequence.AbstractIdentifiableElement
com.itextpdf.layout.ElementPropertyContainer<SignatureFieldAppearance>
com.itextpdf.layout.element.AbstractElement<SignatureFieldAppearance>
com.itextpdf.forms.form.element.FormField<SignatureFieldAppearance>
com.itextpdf.forms.form.element.SignatureFieldAppearance
- All Implemented Interfaces:
IFormField,IAbstractElement,IBlockElement,IElement,IPropertyContainer,IAccessibleElement
Extension of the
FormField class representing a signature field in PDF.-
Field Summary
FieldsModifier and TypeFieldDescriptionCollection of the layout elements which will be rendered as a signature content.private static final floatDefault paddings for the signature field.private StringWe should support signing of existing fields with dots in name, but dots are now allowed in model element id.private SignedAppearanceTextprivate StringFields inherited from class com.itextpdf.forms.form.element.FormField
tagPropertiesFields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, stylesFields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddImageContent(ImageData imageData) private voidaddTextContent(int index, String text) private voidaddTextContent(String text) Gets theaccessibility properties.Gets the final content for this signature.getId()Gets the id.Gets theSignedAppearanceTextinstance for this signature.protected IRendererCreates a new renderer instance.private voidprepareContent(String signer, SignedAppearanceText description) setContent(SignedAppearanceText description) Sets the content for this signature.setContent(SignedAppearanceText description, ImageData image) Sets the content for this signature.setContent(ImageData image) Sets the content for this signature.setContent(Div data) Sets the content for this signature.setContent(String description) Sets the content for this signature.setContent(String signerName, SignedAppearanceText description) Sets the content for this signature.setContent(String description, ImageData image) Sets the content for this signature.setContent(String signerName, String description) Sets the content for this signature.voidsetSignerName(String signerName) Replaces the signer name for this signature if it was set bysetContent(com.itextpdf.forms.fields.properties.SignedAppearanceText).Methods inherited from class com.itextpdf.forms.form.element.FormField
getDefaultProperty, setAlternativeDescription, setHeight, setInteractive, setSize, setValue, setWidthMethods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumberMethods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, getTransparentStrokeColor, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalicMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.itextpdf.layout.element.IAbstractElement
getChildrenMethods inherited from interface com.itextpdf.layout.element.IElement
createRendererSubTree, getRenderer, setNextRendererMethods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Field Details
-
DEFAULT_PADDING
private static final float DEFAULT_PADDINGDefault paddings for the signature field.- See Also:
-
contentElements
Collection of the layout elements which will be rendered as a signature content. -
signedAppearanceText
-
signerName
-
idWithDots
We should support signing of existing fields with dots in name, but dots are now allowed in model element id. So it is a placeholder for such cases.
-
-
Constructor Details
-
SignatureFieldAppearance
Creates a newSignatureFieldAppearanceinstance.- Parameters:
id- signature field name if you use thisSignatureFieldAppearancein pure layout for the new interactive signature field creation. ID will be ignored if thisSignatureFieldAppearanceis used for signing or for existing signature field
-
-
Method Details
-
setContent
Sets the content for this signature.- Parameters:
description-SignedAppearanceTextinstance representing the signature text identifying the signer.- Returns:
- this same
SignatureFieldAppearanceinstance.
-
setContent
Sets the content for this signature.- Parameters:
description- the signature text identifying the signer.- Returns:
- this same
SignatureFieldAppearanceinstance.
-
setContent
Sets the content for this signature.- Parameters:
description-SignedAppearanceTextinstance representing the signature text identifying the signer.image- the Image object to render.- Returns:
- this same
SignatureFieldAppearanceinstance.
-
setContent
Sets the content for this signature.- Parameters:
description- the signature text identifying the signer.image- the Image object to render.- Returns:
- this same
SignatureFieldAppearanceinstance.
-
setContent
Sets the content for this signature.- Parameters:
image- the Image object to render.- Returns:
- this same
SignatureFieldAppearanceinstance.
-
setContent
Sets the content for this signature.- Parameters:
signerName- the name of the signer from the certificate.description-SignedAppearanceTextinstance representing the signature text identifying the signer.- Returns:
- this same
SignatureFieldAppearanceinstance.
-
setContent
Sets the content for this signature.- Parameters:
signerName- the name of the signer from the certificate.description- the signature text identifying the signer.- Returns:
- this same
SignatureFieldAppearanceinstance.
-
setContent
Sets the content for this signature.- Parameters:
data- the custom signature data which will be rendered.- Returns:
- this same
SignatureFieldAppearanceinstance.
-
getContentElements
Gets the final content for this signature.- Returns:
- collection of the layout elements which will be rendered as a signature content.
-
getSignedAppearanceText
Gets theSignedAppearanceTextinstance for this signature.- Returns:
SignedAppearanceTextinstance if it was set bysetContent(com.itextpdf.forms.fields.properties.SignedAppearanceText), null otherwise.
-
setSignerName
Replaces the signer name for this signature if it was set bysetContent(com.itextpdf.forms.fields.properties.SignedAppearanceText).- Parameters:
signerName- signer name to set.
-
getId
Gets the id.- Specified by:
getIdin interfaceIFormField- Overrides:
getIdin classFormField<SignatureFieldAppearance>- Returns:
- the id
-
getAccessibilityProperties
Gets theaccessibility properties. See alsoIAccessibleElement.- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
Creates a new renderer instance.- Specified by:
makeNewRendererin classAbstractElement<SignatureFieldAppearance>- Returns:
- new
IRenderer
-
prepareContent
-
addTextContent
-
addTextContent
-
addImageContent
-