public final class SignatureField extends Field
Represents signature form field.
_FileSelect, _Password
_disableUpdateAppearance
Constructor and Description |
---|
SignatureField(IDocument doc,
Rectangle rect)
Initializes new instance of the
SignatureField class. |
SignatureField(Page page,
Rectangle rect)
Initializes new instance of the
SignatureField class. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes signature object from field.
|
InputStream |
extractCertificate()
Extracts the single X.509 certificate in DER format as a stream.
|
InputStream |
extractImage()
Extracts signature's image as jpeg encoded stream.
|
InputStream |
extractImage(ImageType format)
Extracts signature's image as encoded stream.
|
Signature |
getSignature()
Gets signature object.
|
void |
sign(Signature signature)
Sign the document using this signature field.
|
void |
sign(Signature signature,
InputStream pfx,
String pass)
Signs the document using this signature field.
|
add, contains, copyTo, copyTo, flatten, get_Item, get_Item, getAlternateName, getAnnotationIndex, getMappingName, getMaxFontSize, getPageIndex, getPartialName, getRect, getSyncRoot, getTabOrder, getValue, isFitIntoRectangle, isGroup, isReadOnly, isSharedField, isSynchronized, iterator, recalculate, remove, setAlternateName, setAnnotationIndex, setFitIntoRectangle, setMappingName, setMaxFontSize, setPartialName, setPosition, setRect, setSharedField, setTabOrder, setValue, size, updateAppearances
accept, getAnnotationActions, getAnnotationType, getDefaultAppearance, getExportable, getHighlighting, getOnActivated, getParent, getReadOnly, getRequired, setDefaultAppearance, setExportable, setHighlighting, setOnActivated, setReadOnly, setRequired
createAnnotation, getActiveState, getAlignment, getAppearance, getBorder, getCharacteristics, getColor, getContents, getEngineDict, getEngineObj, getFlags, getFullName, getHeight, getHorizontalAlignment_Annotation_New, getModified, getModifiedInternal, getName, getNormalAppearance, getPage, getPageIndex, getPdfActions, getRectangle, getStates, getTextHorizontalAlignment, getWidth, initialize, isUpdateAppearanceOnConvert, isUseFontSubset, setActiveState, setAlignment, setBorder, setColor, setContents, setFlags, setHeight, setHorizontalAlignment_Annotation_New, setModified, setModifiedInternal, setName, setStructParent, setTextHorizontalAlignment, setUpdateAppearanceOnConvert, setUseFontSubset, setWidth
deepClone, getHorizontalAlignment, getHyperlink, getMargin, getVerticalAlignment, getZIndex, isFirstParagraphInColumn, isInLineParagraph, isInNewPage, isKeptWithNext, setFirstParagraphInColumn, setHorizontalAlignment, setHyperlink, setInLineParagraph, setInNewPage, setKeptWithNext, setMargin, setVerticalAlignment, setZIndex
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public SignatureField(Page page, Rectangle rect)
Initializes new instance of the SignatureField
class.
page
- Page where signature field should be placed.rect
- Position and size of signature field.public Signature getSignature()
Gets signature object. This object contains signature data regarding public-key cryptographic
standards. Classes PKCS1
, PKCS7
and PKCS7Detached
represent all
supported types of signature objects.
public void sign(Signature signature, InputStream pfx, String pass)
Signs the document using this signature field.
signature
- Signature object, see PKCS1
, PKCS7
, PKCS7Detached
.pfx
- Stream with certificate.pass
- Password to access private in the pfx
.public void sign(Signature signature)
Sign the document using this signature field.
signature
- Signature object, see PKCS1
, PKCS7
and PKCS7Detached
.public InputStream extractImage(ImageType format)
Extracts signature's image as encoded stream.
format
- Image format for encoding.public InputStream extractImage()
Extracts signature's image as jpeg encoded stream.
public InputStream extractCertificate()
Extracts the single X.509 certificate in DER format as a stream.