Class PDSignatureField
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.form.PDField
org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField
org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField
- All Implemented Interfaces:
COSObjectable
A signature field is a form field that contains a digital signature.
- Author:
- Ben Litchfield, Thomas Chojecki
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the default value, if any.(Optional; PDF 1.5) A seed value dictionary containing information that constrains the properties of a signature that is applied to the field.Get the signature dictionary.getValue()
Returns the signature contained in this field.Returns a string representation of the "V" entry, or an empty string.void
setDefaultValue
(PDSignature value) Sets the default value of this field to be the given signature.void
(Optional; PDF 1.) A seed value dictionary containing information that constrains the properties of a signature that is applied to the field.void
setSignature
(PDSignature value) Deprecated.void
This will throw an UnsupportedOperationException if used as the signature fields value can't be set using a Stringvoid
setValue
(PDSignature value) Sets the value of this field to be the given signature.Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField
applyChange, getFieldFlags, getFieldType, getWidget, getWidgets, importFDF, setActions, setWidgets
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDField
getAcroForm, getActions, getAlternateFieldName, getCOSObject, getFullyQualifiedName, getInheritableAttribute, getMappingName, getParent, getPartialName, isNoExport, isReadOnly, isRequired, setAlternateFieldName, setFieldFlags, setMappingName, setNoExport, setPartialName, setReadOnly, setRequired, toString
-
Constructor Details
-
PDSignatureField
- Parameters:
acroForm
- The acroForm for this field.- Throws:
IOException
- If there is an error while resolving partial name for the signature field or getting the widget object.- See Also:
-
-
Method Details
-
setSignature
Deprecated.UsesetValue(PDSignature)
instead.Add a signature dictionary to the signature field.- Parameters:
value
- is the PDSignatureField- Throws:
IOException
-
getSignature
Get the signature dictionary.- Returns:
- the signature dictionary
-
setValue
Sets the value of this field to be the given signature.- Parameters:
value
- is the PDSignatureField- Throws:
IOException
-
setValue
This will throw an UnsupportedOperationException if used as the signature fields value can't be set using a String- Specified by:
setValue
in classPDField
- Parameters:
value
- the plain text value.- Throws:
UnsupportedOperationException
- in all cases!
-
setDefaultValue
Sets the default value of this field to be the given signature.- Parameters:
value
- is the PDSignatureField- Throws:
IOException
-
getValue
Returns the signature contained in this field.- Returns:
- A signature dictionary.
-
getDefaultValue
Returns the default value, if any.- Returns:
- A signature dictionary.
-
getValueAsString
Description copied from class:PDField
Returns a string representation of the "V" entry, or an empty string.- Specified by:
getValueAsString
in classPDField
- Returns:
- The list of widget annotations.
-
getSeedValue
(Optional; PDF 1.5) A seed value dictionary containing information that constrains the properties of a signature that is applied to the field.
- Returns:
- the seed value dictionary as PDSeedValue
-
setSeedValue
(Optional; PDF 1.) A seed value dictionary containing information that constrains the properties of a signature that is applied to the field.
- Parameters:
sv
- is the seed value dictionary as PDSeedValue
-
setValue(PDSignature)
instead.