![]() |
SignDoc SDK (Java)
5.0.0
|
Parameters for signing a document. More...
Public Member Functions | |
synchronized void | setString (String aName, String aValue) throws SignDocException |
Set a string parameter. More... | |
synchronized void | setInteger (String aName, int aValue) throws SignDocException |
Set an integer parameter. More... | |
synchronized void | setBlob (String aName, byte[] aData) throws SignDocException |
Set a blob parameter. More... | |
synchronized void | setLength (String aName, int aType, double aValue) throws SignDocException |
Set a length parameter. More... | |
synchronized void | setColor (String aName, SignDocColor aValue) throws SignDocException |
Set a color parameter. More... | |
synchronized void | addTextItem (String aItem, int aGroup) throws SignDocException |
Add another string to be displayed, top down. More... | |
synchronized void | addTextItem2 (String aItem, int aGroup, int aHAlignment, int aDirection) throws SignDocException |
Add another string to be displayed, top down, with paragraph direction. More... | |
synchronized void | clearTextItems () throws SignDocException |
Remove all strings that were to be displayed. More... | |
synchronized void | setTextItemDirection (String aItem, int aHAlignment, int aDirection) throws SignDocException |
Set the paragraph direction of text items. More... | |
synchronized void | setPKCS7 (SignPKCS7 aPKCS7) throws SignDocException |
Set an object which will create a PKCS #7 or CAdES signature. More... | |
synchronized void | setRSA (SignRSA aRSA) throws SignDocException |
Set an object which will compute an RSA signature. More... | |
synchronized void | setECDSA (SignECDSA aECDSA) throws SignDocException |
Set an object which will compute an ECDSA signature. More... | |
synchronized int | getAvailableMethods () throws SignDocException |
Get a bitset indicating which signing methods are available for this signature field. More... | |
synchronized byte[] | getTemplate () throws SignDocException |
Get an XML document specifying the current layout. More... | |
synchronized String | getErrorMessage () throws SignDocException |
Get an error message for the last function call. More... | |
synchronized void | destroy () throws SignDocException |
Destroy the underlying native object, overwriting sensitive data. More... | |
synchronized void | close () |
Destroy the underlying native object, overwriting sensitive data (for java.lang.AutoCloseable). More... | |
Static Public Member Functions | |
static int | getType (String aName) throws SignDocException |
Get the type of a parameter. More... | |
Static Public Attributes | |
static final int | t_undefined = 0 |
Return value of getType(): The specified parameter is not defined. More... | |
static final int | t_integer = 2 |
Return value of getType(): Integer. More... | |
static final int | t_string = 4 |
Return value of getType(): String. More... | |
static final int | t_color = 5 |
Return value of getType(): Color. More... | |
static final int | t_blob = 8 |
Return value of getType(): Blob. More... | |
static final int | t_length = 9 |
Return value of getType(): Length. More... | |
static final int | m_default = 0 |
Signing method (for integer parameter "Method"): default method. More... | |
static final int | m_digsig_pkcs1 = 1 |
Signing method (for integer parameter "Method"): PKCS #1 (RSA keys only). More... | |
static final int | m_digsig_pkcs7_detached = 2 |
Signing method (for integer parameter "Method"): detached PKCS #7. More... | |
static final int | m_digsig_pkcs7_sha1 = 3 |
Signing method (for integer parameter "Method"): PKCS #7 with SHA-1 (deprecated). More... | |
static final int | m_hash = 4 |
Signing method (for integer parameter "Method"): The signature is just a hash (TIFF only). More... | |
static final int | m_digsig_cades_detached = 5 |
Signing method (for integer parameter "Method"): Detached ETSI CAdES (PAdES-BES). More... | |
static final int | m_digsig_cades_rfc3161 = 6 |
Signing method (for integer parameter "Method"): ETSI CAdES RFC 3161 time stamp. More... | |
static final int | o_optimize = 0 |
Optimize document before signing (for integer parameter "Optimize"). More... | |
static final int | o_dont_optimize = 1 |
Don't optimize document before signing (for integer parameter "Optimize"). More... | |
static final int | o_if_possible = 2 |
Optimize the document if possible (for integer parameter "Optimize"). More... | |
static final int | pb_freeze = 0 |
Fix appearances of check boxes and radio buttons for PDF/A-1 without Technical Corrigendum 2 before signing: Freeze (fix) appearances. More... | |
static final int | pb_dont_freeze = 1 |
Fix appearances of check boxes and radio buttons for PDF/A-1 without Technical Corrigendum 2 before signing: Don't freeze (fix) appearances. More... | |
static final int | pb_auto = 2 |
Fix appearances of check boxes and radio buttons for PDF/A-1 without Technical Corrigendum 2 before signing: Freeze (fix) appearances if appropriate. More... | |
static final int | be_rsa = 0 |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Random session key encrypted with public RSA key. More... | |
static final int | be_fixed = 1 |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Fixed key (no security). More... | |
static final int | be_binary = 2 |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Binary 256-bit key. More... | |
static final int | be_passphrase = 3 |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Passphrase that will be hashed to a 256-bit key. More... | |
static final int | be_dont_store = 4 |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): The biometric data won't be stored in the document. More... | |
static final int | bhl_attr = 0 |
Select where to store the message digest computed over the document hash and the unencrypted biometric data: If possible, store the biometric hash as unauthenticated attribute in the PKCS #7 (or CMS) message. More... | |
static final int | bhl_contents = 1 |
Select where to store the message digest computed over the document hash and the unencrypted biometric data: Store the message digest in the Contents entry of the signature dictionary. More... | |
static final int | ha_left = 0 |
Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment" and for addTextItem2()): Align left. More... | |
static final int | ha_center = 1 |
Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment" and for addTextItem2()): Center. More... | |
static final int | ha_right = 2 |
Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment" and for addTextItem2()): Align right. More... | |
static final int | ha_justify = 3 |
Horizontal alignment (for integer parameter "TextHAlignment" and for addTextItem2()): Justify (align both and right, expanding white space). More... | |
static final int | ha_auto = 4 |
Horizontal alignment (for integer parameter "TextHAlignment" and for addTextItem2()): Align left if the text begins with an LTR run, align right if the text begins with an RTL run. More... | |
static final int | ha_default = -1 |
Horizontal alignment (for addTextItem2()): Use integer parameter "TextHAlignment". More... | |
static final int | va_top = 0 |
Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": Align top. More... | |
static final int | va_center = 1 |
Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": Center. More... | |
static final int | va_bottom = 2 |
Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": Align bottom. More... | |
static final int | tp_overlay = 0 |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text and image are independent and overlap (text is painted on image). More... | |
static final int | tp_below = 1 |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put below the image. More... | |
static final int | tp_underlay = 2 |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text and image are independent and overlap (image is painted on text). More... | |
static final int | tp_right_of = 3 |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put on the right of the image. More... | |
static final int | tp_above = 4 |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put above the image. More... | |
static final int | tp_left_of = 5 |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put on the left of the image. More... | |
static final int | vt_abs = 0 |
Indicate how measurements are specified: aValue is the value to be used (units of document coordinates). More... | |
static final int | vt_field_height = 1 |
Indicate how measurements are specified: Multiply aValue by the field height. More... | |
static final int | vt_field_width = 2 |
Indicate how measurements are specified: Multiply aValue by the field width. More... | |
static final int | tg_master = 0 |
Text group: master. More... | |
static final int | tg_slave = 1 |
Text group: slave. More... | |
static final int | tid_ltr = 0x1000 |
Paragraph direction: LTR. More... | |
static final int | tid_rtl = 0x2000 |
Paragraph direction: RTL. More... | |
static final int | tid_default_ltr = 0x4000 |
Paragraph direction: Choose direction automatically, default to LTR. More... | |
static final int | tid_default_rtl = 0x8000 |
Paragraph direction: Choose direction automatically, default to RTL. More... | |
static final int | isv_SubFilter = 0x01 |
Flag for ignoring mandatory requirements specified by the signature seed value dictionary: Ignore SubFilter (signing method). More... | |
static final int | isv_DigestMethod = 0x02 |
Flag for ignoring mandatory requirements specified by the signature seed value dictionary: Ignore DigestMethod (hash algorithm). More... | |
static final int | csf_software = 0x01 |
Flags for selecting certificates (for integer parameter "SelectCertificate": include certificates with software-based private keys. More... | |
static final int | csf_hardware = 0x02 |
Flags for selecting certificates (for integer parameter "SelectCertificate": include certificates with hardware-based private keys. More... | |
static final int | csf_use_certificate_seed_values = 0x10 |
Flags for selecting certificates (for integer parameter "SelectCertificate": include only certificates allowed by the PDF document's certificate seed value dictionary. More... | |
static final int | csf_ask_if_ambiguous = 0x20 |
Flags for selecting certificates (for integer parameter "SelectCertificate": ask the user to select a certificate if there is more than one matching certificate. More... | |
static final int | csf_never_ask = 0x40 |
Flags for selecting certificates (for integer parameter "SelectCertificate": never ask the user to select a certificate; exactly one certificate must match. More... | |
static final int | csf_create_self_signed = 0x80 |
Flags for selecting certificates (for integer parameter "SelectCertificate": offer to create a self-signed certificate (cannot be used with csf_never_ask and csf_ask_if_ambiguous). More... | |
static final int | rsf_bw = 0x01 |
Flags for rendering the signature (for integer parameter "RenderSignature": black and white. More... | |
static final int | rsf_gray = 0x02 |
Flags for rendering the signature (for integer parameter "RenderSignature": use gray levels computed from pressure. More... | |
static final int | rsf_antialias = 0x04 |
Flags for rendering the signature (for integer parameter "RenderSignature": use gray levels for antialiasing. More... | |
static final int | rsf_limit_size = 0x08 |
Flags for rendering the signature (for integer parameter "RenderSignature": Limit the size of the rendered signature to the size of the captured signature. More... | |
static final int | it_opaque = 0 |
Transparency of signature image: Make signature image opaque. More... | |
static final int | it_brightest = 1 |
Transparency of signature image: Make the brightest color transparent. More... | |
static final int | ac_all = 0 |
Integer parameter AddCertificates: Include all intermediate certificates and the root certificate. More... | |
static final int | ac_none = 1 |
Integer parameter AddCertificates: Do not include any certificates. More... | |
static final int | ac_trusted = 2 |
Integer parameter AddCertificates: Include all intermediate certificates and the root certificate, require the root certificate to be trusted. More... | |
static final int | ari_add = 0x01 |
Flag for integer parameter AddRevocationInfo: Add revocation data. More... | |
static final int | rx_always = 0 |
Integer parameter "RemoveXFA": Always remove XFA. More... | |
static final int | rx_if_allowed = 1 |
Integer parameter "RemoveXFA": Remove XFA if possible. More... | |
static final int | rx_never = 2 |
Integer parameter "RemoveXFA": Do not remove XFA. More... | |
Protected Member Functions | |
void | finalize () throws Throwable |
Finalize this object. More... | |
Parameters for signing a document.
Use SignDocDocument.createSignatureParameters() or SignDocDocument.createSignatureParametersForTimeStamp() to create objects of this type.
The available parameters depend both on the document type and on the signature field for which the SignDocSignatureParameters object has been created. All setters have a special value for one of their arguments which can be used for checking if the parameter can be set.
SignDocDocument.addSignature() may fail due to invalid parameters even if all setters reported success as the setters do not check if there are conflicts between parameters.
Which certificates are acceptable may be restricted by the application (by using csf_software and csf_hardware of integer parameter "SelectCertificate", blob parameters "FilterCertificatesByIssuerCertificate" and "FilterCertificatesBySubjectCertificate", and string parameters "FilterCertificatesByPolicy" and "FilterCertificatesBySubjectDN") and by the PDF document (certificate seed value dictionary). If no matching certificate is available (for instance, because integer parameter "SelectCertificate" is zero), SignDocDocument.addSignature() will throw SignDocNoCertificateException. If more than one matching certificate is available but csf_never_ask is specified in integer parameter "SelectCertificate"), SignDocDocument.addSignature() will throw SignDocAmbiguousCertificateException.
To make the signature maximally meaningful, integer parameter "AddCertificates" should be ac_all (which is the default value) and integer parameter "AddRevocationInfo" should include ari_add.
Unless you need a specific signing method, you should leave integer parameter "Method" at its default value m_default. If you select a specific signing method and that method is not allowed by the signature field's seed values, signing will fail.
Unless you need a specific digest algorithm, you should leave string parameter "DetachedHashAlgorithm" at its default value "default". If you select a specific digest algorithm and that algorithm is not allowed by the signature field's seed values, signing will fail.
The interaction between some parameters is quite complex; the following section tries to summarize the signing methods for PDF documents.
Additionally:
For TIFF documents, an additional, simplified signing method is available:
The following parameters control the signing method and related aspects of the signature:
The following parameters control the private key used for signing:
The following parameters control rendering of the signature image from biometric data:
The following parameters put additional data into the signature:
The following parameters provide texts for the appearance of a signature in PDF documents:
The following parameters control how a signed signature field in a PDF document will look like (parameters marked with * can be overridden with blob parameter "Template"):
The following parameters control the signing certificate:
The following parameters are used for generating a self-signed certificate on the fly (you also need to set at least one parameter for the private key):
The following parameters are used for putting biometric data (handwritten signature) into the signature:
The following parameters control the certificate selection dialog:
The following parameters control RFC 3161 timestamps:
The following parameters put additional certificates and revocation information into the signature:
The following parameters do not fall into the above categories:
synchronized void addTextItem | ( | String | aItem, |
int | aGroup | ||
) | throws SignDocException |
Add another string to be displayed, top down.
For DigSig signature fields, this function adds another string to the appearance stream of PDF documents. The first call clears any default strings. The default values depend on the profile passed to SignDocDocument.createSignatureParameters():
Profile | Value |
---|---|
"" | "Signer"/tg_master, "SignTime"/tg_master |
"image" | (empty) |
The paragraph direction is 0 which is treated like tid_ltr.
See also blob parameter "Template".
This function throws SignDocInvalidValueException if aItem or aGroup is invalid.
[in] | aItem | Select the string to be added:
|
[in] | aGroup | The string's group for font size computation (tg_master or tg_slave). |
synchronized void addTextItem2 | ( | String | aItem, |
int | aGroup, | ||
int | aHAlignment, | ||
int | aDirection | ||
) | throws SignDocException |
Add another string to be displayed, top down, with paragraph direction.
For DigSig signature fields, this function adds another string to the appearance stream of PDF documents. The first call clears any default strings. The default values depend on the profile passed to SignDocDocument.createSignatureParameters():
Profile | Value |
---|---|
"" | "Signer"/tg_master, "SignTime"/tg_master |
"image" | (empty) |
See also blob parameter "Template".
This function throws SignDocInvalidValueException if aItem, aGroup, aHAlignment, or aDirection is invalid.
[in] | aItem | Select the string to be added:
|
[in] | aGroup | The string's group for font size computation (tg_master or tg_slave). |
[in] | aHAlignment | Horizontal alignment. This value overrides integer parameter "TextHAlignment" unless it is ha_default. |
[in] | aDirection | The paragraph direction: 0, tid_ltr, tid_rtl, tid_default_ltr, or tid_default_rtl. 0 is treated like tid_ltr. |
synchronized void clearTextItems | ( | ) | throws SignDocException |
Remove all strings that were to be displayed.
addTextItem() cannot remove the default strings without adding a new string. This function does.
See also blob parameter "Template".
synchronized void close | ( | ) |
Destroy the underlying native object, overwriting sensitive data (for java.lang.AutoCloseable).
After calling this method, all methods but close() and destroy() will throw SignDocUnexpectedErrorException.
synchronized void destroy | ( | ) | throws SignDocException |
Destroy the underlying native object, overwriting sensitive data.
After calling this method, all methods but close() and destroy() will throw SignDocUnexpectedErrorException.
|
protected |
Finalize this object.
Do not call this method unless you know what you are doing.
synchronized int getAvailableMethods | ( | ) | throws SignDocException |
Get a bitset indicating which signing methods are available for this signature field.
synchronized String getErrorMessage | ( | ) | throws SignDocException |
Get an error message for the last function call.
synchronized byte [] getTemplate | ( | ) | throws SignDocException |
Get an XML document specifying the current layout.
This function can be used for debugging and for reporting bugs. This function will fail if the "Template" blob parameter is invalid.
|
static |
Get the type of a parameter.
[in] | aName | The name of the parameter (case-sensitive). |
synchronized void setBlob | ( | String | aName, |
byte[] | aData | ||
) | throws SignDocException |
Set a blob parameter.
Available blob parameters are:
Additionally, you can store your own blobs in the signature by using a name starting with "Prop_", except for "Prop_AuthTime", "Prop_AuthType", "Prop_Build", and any name starting with "Prop_BiometricData", see SignDocVerificationResult.getSignatureString(). The name shall contain the following characters only: 0-9, a-z, A-Z, '-', and '_'.
This function throws SignDocUnknownParameterException if aName is not the name of a blob parameter, SignDocInvalidValueException if aValue is invalid.
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aData | The value. |
synchronized void setColor | ( | String | aName, |
SignDocColor | aValue | ||
) | throws SignDocException |
Set a color parameter.
Available color parameters are:
This function throws SignDocUnknownParameterException if aName is not the name of a color parameter, SignDocInvalidValueException if aValue is invalid.
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aValue | The value of the parameter. |
synchronized void setECDSA | ( | SignECDSA | aECDSA | ) | throws SignDocException |
Set an object which will compute an ECDSA signature.
By default, ECDSA signatures are computed internally which means that the private key must be available on this machine.
Requirements for string parameters:
Requirements for integer parameters:
Requirements for blob parameters:
setRSA() and setPKCS7() must not have been called
[in] | aECDSA | The object that will compute the ECDSA signature. |
synchronized void setInteger | ( | String | aName, |
int | aValue | ||
) | throws SignDocException |
Set an integer parameter.
Available integer parameters are:
Profile | Value |
---|---|
"" | ha_center |
"image" | ha_center |
Profile | Value |
---|---|
"" | va_top |
"image" | va_center |
Profile | Value |
---|---|
"" | ha_center |
"image" | ha_center |
Profile | Value |
---|---|
"" | tp_below |
"image" | tp_overlay |
Profile | Value |
---|---|
"" | va_bottom |
"image" | va_center |
This function throws SignDocUnknownParameterException if aName is not the name of an integer parameter, SignDocInvalidValueException if aValue is invalid.
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aValue | The value of the parameter. |
synchronized void setLength | ( | String | aName, |
int | aType, | ||
double | aValue | ||
) | throws SignDocException |
Set a length parameter.
Available length parameters are:
Profile | Value |
---|---|
"" | vt_field_height and 0.1 |
"image" | vt_field_height and 0.1 |
Profile | Value |
---|---|
"" | vt_abs and 1.0 |
"image" | vt_abs and 1.0 |
Profile | Value |
---|---|
"" | vt_field_height and 0.1 |
"image" | vt_field_height and 0.1 |
This function throws SignDocUnknownParameterException if aName is not the name of a length parameter, SignDocInvalidValueException if aValue is invalid.
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aType | Define how the length is specified (vt_abs, vt_field_height, or vt_field_width). |
[in] | aValue | The value of the parameter. |
synchronized void setPKCS7 | ( | SignPKCS7 | aPKCS7 | ) | throws SignDocException |
Set an object which will create a PKCS #7 or CAdES signature.
By default, PKCS #7 and CAdES signatures are handled internally which means that the private key must be available on this machine.
Requirements for string parameters:
Requirements for integer parameters:
Requirements for blob parameters:
setECDSA() and setRSA() must not have been called
The SignPKCS7 interface is quite hard to use, please use setRSA() and the SignRSA interface or setECDSA() and the SignECDSA interface instead.
[in] | aPKCS7 | The object that will create the PKCS #7 or CAdES signature. |
synchronized void setRSA | ( | SignRSA | aRSA | ) | throws SignDocException |
Set an object which will compute an RSA signature.
By default, RSA signatures are computed internally which means that the private key must be available on this machine.
Requirements for string parameters:
Requirements for integer parameters:
Requirements for blob parameters:
setECDSA() and setPKCS7() must not have been called
[in] | aRSA | The object that will compute the RSA signature. |
synchronized void setString | ( | String | aName, |
String | aValue | ||
) | throws SignDocException |
Set a string parameter.
Available string parameters are:
Additionally, you can store your own strings in the signature by using a name starting with "Prop_", except for "Prop_AuthTime", "Prop_AuthType", "Prop_Build", and any name starting with "Prop_BiometricData", see SignDocVerificationResult.getSignatureString(). The name shall contain the following characters only: 0-9, a-z, A-Z, '-', and '_'. The length of the value is restricted for PDF documents and depends on the characters being used; the value encoded as PDF text string shall not exceed 32767 octets.
This function throws SignDocUnknownParameterException if aName is not the name of a string parameter, SignDocInvalidValueException if aValue is invalid.
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aValue | The value of the parameter. |
synchronized void setTextItemDirection | ( | String | aItem, |
int | aHAlignment, | ||
int | aDirection | ||
) | throws SignDocException |
Set the paragraph direction of text items.
This function sets the paragraph direction of all existing text items matching aItem.
See also blob parameter "Template".
This function throws SignDocInvalidValueException if aItem, aHAlignment, or aDirection is invalid.
[in] | aItem | Select the text items:
|
[in] | aHAlignment | Horizontal alignment. This value overrides integer parameter "TextHAlignment" unless it is ha_default. |
[in] | aDirection | The paragraph direction: 0, tid_ltr, tid_rtl, tid_default_ltr, or tid_default_rtl. 0 is treated like tid_ltr. |
|
static |
Integer parameter AddCertificates: Include all intermediate certificates and the root certificate.
This requires building at signing time the complete certificate chain up to a self-signed certificate. It does not matter whether that self-signed certificate is a trusted root CA certificate or not.
|
static |
Integer parameter AddCertificates: Do not include any certificates.
It is assumes that the signing certificate is a self-signed certificate or all intermediate certificates are available at verification time.
|
static |
Integer parameter AddCertificates: Include all intermediate certificates and the root certificate, require the root certificate to be trusted.
This requires building at signing time the complete certificate chain up to a self-signed certificate. That self-signed certificate must be trusted, otherwise signing will fail.
|
static |
Flag for integer parameter AddRevocationInfo: Add revocation data.
This requires building at signing time the complete certificate chain up to a self-signed certificate. It does not matter whether that self-signed certificate is a trusted root CA certificate or not.
|
static |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Binary 256-bit key.
Blob parameter "BiometricKey" must be set.
The biometric data to be encrypted is specified by blob parameter "BiometricData".
|
static |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): The biometric data won't be stored in the document.
Use this value if you want to use the biometric data for generating the signature image only. Note that using an automatically generated self-signed certificate is secure only if biometric data is stored in the document using asymmetric encryption.
|
static |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Fixed key (no security).
The biometric data to be encrypted is specified by blob parameter "BiometricData".
|
static |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Passphrase that will be hashed to a 256-bit key.
String parameter "BiometricPassphrase" must be set.
The biometric data to be encrypted is specified by blob parameter "BiometricData".
|
static |
Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Random session key encrypted with public RSA key.
Either blob parameter "BiometricKey" or string parameter "BiometricKeyPath" must be set.
The biometric data to be encrypted is specified by blob parameter "BiometricData".
|
static |
Select where to store the message digest computed over the document hash and the unencrypted biometric data: If possible, store the biometric hash as unauthenticated attribute in the PKCS #7 (or CMS) message.
Used for integer parameter "BiometricHashLocation".
For method m_digsig_pkcs1, the biometric hash will stored in the Contents entry of the signature dictionary (see bhl_contents).
For all other methods, the biometric hash will stored as unauthenticated attribute in the PKCS #7 (or CMS) message.
|
static |
Select where to store the message digest computed over the document hash and the unencrypted biometric data: Store the message digest in the Contents entry of the signature dictionary.
Used for integer parameter "BiometricHashLocation".
This is what SignDoc SDK 4.1 and older did; it violates a constraint of most PDF specifications.
|
static |
Flags for selecting certificates (for integer parameter "SelectCertificate": ask the user to select a certificate if there is more than one matching certificate.
|
static |
Flags for selecting certificates (for integer parameter "SelectCertificate": offer to create a self-signed certificate (cannot be used with csf_never_ask and csf_ask_if_ambiguous).
|
static |
Flags for selecting certificates (for integer parameter "SelectCertificate": include certificates with hardware-based private keys.
As software-based private keys and hardware-based private keys cannot be reliably distinguished, you should always set both csf_software and csf_hardware.
If neither csf_ask_if_ambiguous nor csf_never_ask is included, the certificate selection dialog will be displayed.
|
static |
Flags for selecting certificates (for integer parameter "SelectCertificate": never ask the user to select a certificate; exactly one certificate must match.
|
static |
Flags for selecting certificates (for integer parameter "SelectCertificate": include certificates with software-based private keys.
As software-based private keys and hardware-based private keys cannot be reliably distinguished, you should always set both csf_software and csf_hardware.
If neither csf_ask_if_ambiguous nor csf_never_ask is included, the certificate selection dialog will be displayed.
|
static |
Flags for selecting certificates (for integer parameter "SelectCertificate": include only certificates allowed by the PDF document's certificate seed value dictionary.
|
static |
Horizontal alignment (for integer parameter "TextHAlignment" and for addTextItem2()): Align left if the text begins with an LTR run, align right if the text begins with an RTL run.
|
static |
Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment" and for addTextItem2()): Center.
|
static |
Horizontal alignment (for addTextItem2()): Use integer parameter "TextHAlignment".
|
static |
Horizontal alignment (for integer parameter "TextHAlignment" and for addTextItem2()): Justify (align both and right, expanding white space).
|
static |
Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment" and for addTextItem2()): Align left.
|
static |
Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment" and for addTextItem2()): Align right.
|
static |
Flag for ignoring mandatory requirements specified by the signature seed value dictionary: Ignore DigestMethod (hash algorithm).
Used for integer parameter "IgnoreSeedValues".
If this flag is not set, signing will fail if a hash algorithm is requested that is not listed in the DigestMethod entry of the signature field seed value dictionary. The hash algorithnm is specified by string parameter "DetachedHashAlgorithm" (if the value of that parameter is not "default"). It can also be implied by integer parameter "Method".
If this flag is set, you can override the DigestMethod entry of the signature field seed value dictionary with string parameter "DetachedHashAlgorithm" and/or integer parameter "Method" without risking failure of signing due to a conflict with DigestMethod.
|
static |
Flag for ignoring mandatory requirements specified by the signature seed value dictionary: Ignore SubFilter (signing method).
Used for integer parameter "IgnoreSeedValues".
If this flag is not set, signing will fail if the signing method specified by integer parameter "Method" is neither m_default nor listed in the SubFilter entry of the signature field seed value dictionary.
If this flag is set, you can override the SubFilter entry of the signature field seed value dictionary with integer parameter "Method" without risking failure of signing due to a conflict between "Method" and SubFilter.
|
static |
Transparency of signature image: Make the brightest color transparent.
If the image has an alpha channel (or if its palette contains a transparent color), the image's transparency will be used. Otherwise, white will be made transparent for truecolor images and the brightest color in the palette will be made transparent for indexed images (including grayscale images).
Transparency is not supported for JPEG images and JPEG-compressed TIFF images. Signature images created from biometric data (according to the "RenderSignature" integer parameter) don't have an alpha channel.
|
static |
Transparency of signature image: Make signature image opaque.
The signature image will be opaque unless the image has an Used for integer parameter "ImageTransparency". alpha channel or transparent colors in its palette.
Transparency is not supported for JPEG images and JPEG-compressed TIFF images. Signature images created from biometric data (according to the "RenderSignature" integer parameter) don't have an alpha channel.
|
static |
Signing method (for integer parameter "Method"): default method.
For signature parameters created by SignDocDocument.createSignatureParametersForTimeStamp(), this value is treated as m_digsig_cades_rfc3161.
Use the method specified by the SubFilter values of the signature field seed value dictionary or, if not present, m_digsig_pkcs7_detached.
This is the recommended method unless you need an ETSI CAdES signature (m_digsig_cades_detached).
|
static |
Signing method (for integer parameter "Method"): Detached ETSI CAdES (PAdES-BES).
|
static |
Signing method (for integer parameter "Method"): ETSI CAdES RFC 3161 time stamp.
|
static |
Signing method (for integer parameter "Method"): PKCS #1 (RSA keys only).
Not allowed for PDF/A-2 and PDF/A-3.
|
static |
Signing method (for integer parameter "Method"): detached PKCS #7.
|
static |
Signing method (for integer parameter "Method"): PKCS #7 with SHA-1 (deprecated).
|
static |
Signing method (for integer parameter "Method"): The signature is just a hash (TIFF only).
|
static |
Don't optimize document before signing (for integer parameter "Optimize").
|
static |
Optimize the document if possible (for integer parameter "Optimize").
Optimization is possible if there is not yet any signature.
|
static |
Optimize document before signing (for integer parameter "Optimize").
|
static |
Fix appearances of check boxes and radio buttons for PDF/A-1 without Technical Corrigendum 2 before signing: Freeze (fix) appearances if appropriate.
Used for integer parameter "PDFAButtons".
Freeze (fix) appearances if the document claims PDF/A-1 conformance and if there are no signed signature fields.
Using pb_auto if the document claims PDF/A-1 conformance and has no signed signature fields is equivalent to saving the document with SignDocDocument.sf_pdfa_buttons before signing.
This value should be used only if you need conformance with ISO 19005-1:2005 without Technical Corrigendum 2 (TC2), that is, if you need conformance with a standard that is no longer in force.
Note that TC2 is in force and using this value breaks conformance with TC2.
|
static |
Fix appearances of check boxes and radio buttons for PDF/A-1 without Technical Corrigendum 2 before signing: Don't freeze (fix) appearances.
Used for integer parameter "PDFAButtons".
This value should be used unless you need conformance with a standard (ISO 19005-1:2005 without Technical Corrigendum 2) that is no longer in force.
|
static |
Fix appearances of check boxes and radio buttons for PDF/A-1 without Technical Corrigendum 2 before signing: Freeze (fix) appearances.
Used for integer parameter "PDFAButtons".
Using pb_freeze is equivalent to saving the document with SignDocDocument.sf_pdfa_buttons before signing.
This value should be used only if you need conformance with ISO 19005-1:2005 before Technical Corrigendum 2 (TC2), that is, if you need conformance with a standard that is no longer in force.
Note that TC2 is in force and using this value breaks conformance with TC2.
|
static |
Flags for rendering the signature (for integer parameter "RenderSignature": use gray levels for antialiasing.
rsf_bw, rsf_gray, and rsf_antialias are mutually exclusive.
|
static |
Flags for rendering the signature (for integer parameter "RenderSignature": black and white.
rsf_bw, rsf_gray, and rsf_antialias are mutually exclusive.
|
static |
Flags for rendering the signature (for integer parameter "RenderSignature": use gray levels computed from pressure.
rsf_bw, rsf_gray, and rsf_antialias are mutually exclusive.
|
static |
Flags for rendering the signature (for integer parameter "RenderSignature": Limit the size of the rendered signature to the size of the captured signature.
If this flag is set, the rendered signature won't be magnified. However, it may be shrunk to fit the signature field.
Set this flag only if you are sure that the capture resolution stored in the blob passed to blob parameter "BiometricData" is accurate.
|
static |
Integer parameter "RemoveXFA": Always remove XFA.
Use this value if you intend to call SignDocDocument.setField() or SignDocDocument.addField() after signing. Adding the signature will fail if the document prohibits removal of XFA.
|
static |
Integer parameter "RemoveXFA": Remove XFA if possible.
XFA will be removed unless the document prohibits removal of XFA. SignDocDocument.addField() and SignDocDocument.setField() will fail if XFA is still present after signing.
|
static |
Integer parameter "RemoveXFA": Do not remove XFA.
SignDocDocument.addField() and SignDocDocument.setField() will fail if XFA is still present after signing.
|
static |
Return value of getType(): Color.
|
static |
Return value of getType(): Integer.
|
static |
Return value of getType(): Length.
|
static |
Return value of getType(): String.
|
static |
Return value of getType(): The specified parameter is not defined.
|
static |
Text group: master.
One font size is used per group and is chosen such that the text fits horizontally. The maximum font size is specified by length parameter "FontSize". The font size of the slave group cannot be greater than the font size of the master group, that is, long text in the slave group won't reduce the font size of the master group.
There must be at least one master text item if there is a slave text item.
|
static |
Text group: slave.
One font size is used per group and is chosen such that the text fits horizontally. The maximum font size is specified by length parameter "FontSize". The font size of the slave group cannot be greater than the font size of the master group, that is, long text in the slave group won't reduce the font size of the master group.
|
static |
Paragraph direction: Choose direction automatically, default to LTR.
The base direction of each paragraph (BiDi paragraph level) will depend on the first strong directional character in the paragraph.
The paragraph level will be 0 (LTR) for paragraphs having no strong directional character.
|
static |
Paragraph direction: Choose direction automatically, default to RTL.
The base direction of each paragraph (BiDi paragraph level) will depend on the first strong directional character in the paragraph.
The paragraph level will be 1 (RTL) for paragraphs having no strong directional character.
|
static |
Paragraph direction: LTR.
|
static |
Paragraph direction: RTL.
|
static |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put above the image.
|
static |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put below the image.
|
static |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put on the left of the image.
|
static |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text and image are independent and overlap (text is painted on image).
|
static |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put on the right of the image.
|
static |
Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text and image are independent and overlap (image is painted on text).
|
static |
Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": Align bottom.
|
static |
Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": Center.
|
static |
Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": Align top.
|
static |
Indicate how measurements are specified: aValue is the value to be used (units of document coordinates).
See Coordinate Systems.
|
static |
Indicate how measurements are specified: Multiply aValue by the field height.
|
static |
Indicate how measurements are specified: Multiply aValue by the field width.