Public Member Functions | Static Public Attributes | Protected Member Functions

de.softpro.doc.SignDocSignatureParameters Class Reference

Parameters for signing a document. More...

List of all members.

Public Member Functions

synchronized int getState (String aName) throws SignDocException
 Get the status of a parameter.
synchronized int setString (String aName, String aValue) throws SignDocException
 Set a string parameter.
synchronized int setInteger (String aName, int aValue) throws SignDocException
 Set an integer parameter.
synchronized int setBlob (String aName, byte[] aData) throws SignDocException
 Set a blob parameter.
synchronized int setLength (String aName, int aType, double aValue) throws SignDocException
 Set a length parameter.
synchronized int setColor (String aName, SignDocColor aValue) throws SignDocException
 Set a color parameter.
synchronized int addTextItem (int aItem, int aGroup) throws SignDocException
 Add another string to be displayed, top down.
synchronized int clearTextItems () throws SignDocException
 Remove all strings that were to be displayed.
synchronized int setPKCS7 (SignPKCS7 aPKCS7) throws SignDocException
 Set an object which will create a PKCS #7 or CAdES signature.
synchronized int setRSA (SignRSA aRSA) throws SignDocException
 Set an object which will compute an RSA signature.
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 void destroy () throws SignDocException
 Destroy this object, overwriting sensitive data.

Static Public Attributes

static final int m_default = 0
 Signing method (for integer parameter "Method"): default method.
static final int m_digsig_pkcs1 = 1
 Signing method (for integer parameter "Method"): PKCS #1.
static final int m_digsig_pkcs7_detached = 2
 Signing method (for integer parameter "Method"): detached PKCS #7.
static final int m_digsig_pkcs7_sha1 = 3
 Signing method (for integer parameter "Method"): PKCS #7 with SHA-1 (deprecated).
static final int m_hash = 4
 Signing method (for integer parameter "Method"): The signature is just a hash (TIFF only).
static final int m_digsig_cades_detached = 5
 Signing method (for integer parameter "Method"): Detached ETSI CAdES (PAdES-BES).
static final int m_digsig_cades_rfc3161 = 6
 Signing method for SignDocVerificationResult.getMethod(): Detached ETSI CAdES RFC 3161 time stamp.
static final int dha_default = 0
 Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): default hash algorithm.
static final int dha_sha1 = 1
 Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): SHA-1.
static final int dha_sha256 = 2
 Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): SHA-256.
static final int dha_sha384 = 3
 Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): SHA-384.
static final int dha_sha512 = 4
 Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): SHA-512.
static final int dha_ripemd160 = 5
 Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): RIPEMD-160.
static final int tsha_default = 0
 Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): default value.
static final int tsha_sha1 = 1
 Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): SHA-1.
static final int tsha_sha256 = 2
 Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): SHA-256.
static final int tsha_sha384 = 3
 Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): SHA-384.
static final int tsha_sha512 = 4
 Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): SHA-512.
static final int o_optimize = 0
 Optimize document before signing (for integer parameter "Optimize").
static final int o_dont_optimize = 1
 Don't optimize document before signing (for integer parameter "Optimize").
static final int pb_freeze = 0
 Freeze (fix) appearances before signing (for integer parameter "PDFAButtons").
static final int pb_dont_freeze = 1
 Don't freeze (fix) appearances before signing (for integer parameter "PDFAButtons").
static final int pb_auto = 2
 Freeze (fix) appearances before signing if appropriate (for integer parameter "PDFAButtons").
static final int csa_sha1_rsa = 0
 Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-1 with RSA.
static final int csa_md5_rsa = 1
 Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): MD5 with RSA.
static final int csa_sha256_rsa = 2
 Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-256 with RSA.
static final int csa_sha384_rsa = 3
 Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-384 with RSA.
static final int csa_sha512_rsa = 4
 Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-512 with RSA.
static final int csa_ripemd160_rsa = 5
 Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-512 with RSA.
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.
static final int be_fixed = 1
 Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Fixed key (no security).
static final int be_binary = 2
 Select how to encrypt the biometric data (for integer parameter "BiometricEncryption"): Binary 256-bit key.
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.
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.
static final int ha_left = 0
 Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment": left.
static final int ha_center = 1
 Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment": center.
static final int ha_right = 2
 Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment": right.
static final int ha_justify = 3
 Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment": justify.
static final int va_top = 0
 Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": top.
static final int va_center = 1
 Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": center.
static final int va_bottom = 2
 Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": bottom.
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).
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.
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).
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.
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.
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.
static final int vt_abs = 0
 Indicate how measurements are specified: aValue is the value to be used (units of document coordinates).
static final int vt_field_height = 1
 Indicate how measurements are specified: Multiply aValue by the field height.
static final int vt_field_width = 2
 Indicate how measurements are specified: Multiply aValue by the field width.
static final int ti_signer = 0
 Select a string for the appearance stream of PDF documents: String parameter "Signer".
static final int ti_sign_time = 1
 Select a string for the appearance stream of PDF documents: String parameter "SignTime".
static final int ti_comment = 2
 Select a string for the appearance stream of PDF documents: String parameter "Comment".
static final int ti_adviser = 3
 Select a string for the appearance stream of PDF documents: String parameter "Adviser".
static final int ti_contact_info = 4
 Select a string for the appearance stream of PDF documents: String parameter "ContactInfo".
static final int ti_location = 5
 Select a string for the appearance stream of PDF documents: String parameter "Location".
static final int ti_reason = 6
 Select a string for the appearance stream of PDF documents: String parameter "Reason".
static final int ti_text1 = 7
 Select a string for the appearance stream of PDF documents: String parameter "Text1".
static final int ti_text2 = 8
 Select a string for the appearance stream of PDF documents: String parameter "Text2".
static final int ti_text3 = 9
 Select a string for the appearance stream of PDF documents: String parameter "Text3".
static final int ti_text4 = 10
 Select a string for the appearance stream of PDF documents: String parameter "Text4".
static final int ti_text5 = 11
 Select a string for the appearance stream of PDF documents: String parameter "Text5".
static final int ti_text6 = 12
 Select a string for the appearance stream of PDF documents: String parameter "Text6".
static final int ti_text7 = 13
 Select a string for the appearance stream of PDF documents: String parameter "Text7".
static final int ti_text8 = 14
 Select a string for the appearance stream of PDF documents: String parameter "Text8".
static final int ti_text9 = 15
 Select a string for the appearance stream of PDF documents: String parameter "Text9".
static final int tg_master = 0
 Text group: master.
static final int tg_slave = 1
 Text group: slave.
static final int isv_SubFilter = 0x01
 Flag for ignoring mandatory requirements specified by the signature seed value dictionary: Ignore SubFilter (signing method).
static final int isv_DigestMethod = 0x02
 Flag for ignoring mandatory requirements specified by the signature seed value dictionary: Ignore DigestMethod (hash algorithm).
static final int csf_software = 0x01
 Flags for selecting certificates (for integer parameter "SelectCertificate": include software-based certificates.
static final int csf_hardware = 0x02
 Flags for selecting certificates (for integer parameter "SelectCertificate": include hardware-based certificates.
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.
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.
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.
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).
static final int rsf_bw = 0x01
 Flags for rendering the signature (for integer parameter "RenderSignature": black and white.
static final int rsf_gray = 0x02
 Flags for rendering the signature (for integer parameter "RenderSignature": use gray levels computed from pressure.
static final int rsf_antialias = 0x04
 Flags for rendering the signature (for integer parameter "RenderSignature": use gray levels for antialiasing.
static final int it_opaque = 0
 Transparency of signature image: Make signature image opaque.
static final int it_brightest = 1
 Transparency of signature image: Make the brightest color transparent.
static final int ac_all = 0
 Integer parameter AddCertificates: Include all intermediate certificates and the root certificate.
static final int ac_none = 1
 Integer parameter AddCertificates: Do not include any certificates.
static final int ac_trusted = 2
 Integer parameter AddCertificates: Include all intermediate certificates and the root certificate, require the root certificate to be trusted.
static final int ari_add = 0x01
 Flag for integer parameter AddRevocationInfo: Add revocation data.
static final int rc_ok = 0
 Return code for setter functions: Parameter set successfully.
static final int rc_unknown = 1
 Return code for setter functions: Unknown parameter.
static final int rc_not_supported = 2
 Return code for setter functions: Setting the parameter is not supported.
static final int rc_invalid_value = 3
 Return code for setter functions: The value for the parameter is invalid.
static final int ps_set = 0
 Status of a parameter: Parameter has been set.
static final int ps_missing = 1
 Status of a parameter: Parameter must be set but is not set.
static final int ps_supported = 2
 Status of a parameter: Parameter is supported and optional, but has not been set or is set to the default value.
static final int ps_ignored = 3
 Status of a parameter: Parameter can be (or is) set but will be ignored.
static final int ps_not_supported = 4
 Status of a parameter: Parameter is not supported for this field.
static final int ps_unknown = 5
 Status of a parameter: Unknown parameter.

Protected Member Functions

void finalize () throws Throwable
 Finalize this object.

Detailed Description

Parameters for signing a document.

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 integer parameter "DetachedHashAlgorithm" at its default value dha_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.

(1a)
Default method, private key and self-signed certificate created on the fly:
  • Method: m_default
  • CommonName: signer's name
  • GenerateKeyPair: 1024-4096
(1b)
Default method, the certificate and its key are provided as PKCS #12 blob:
  • Method: m_default
  • Certificate: PKCS #12 blob containing certificate (need not be self-signed) and its private key
  • PKCS#12Password: password for private key in the PKCS #12 blob
(1c)
Default method, private key provided, certificate provided:
  • Method: m_default
  • Certificate: certificate
  • CertificatePrivateKey: private key for the certificate
(1d)
Default method, user must select certificate:
(1e)
Default method, user may select certificate or choose to create a self-signed certificate, the private key of which will be generated:
(1f)
Default method, the certificate is selected programmatically or by the PDF document without user interaction:
  • Method: m_default
  • SelectCertificate: csf_software and/or csf_hardware, csf_never_ask
  • FilterCertificatesByPolicy: accept certificates having all of these certificate policies
  • FilterCertificatesByIssuerCertificate: the acceptable issuer certificates (optional)
  • FilterCertificatesBySubjectCertificate: the acceptable certificates (optional)
  • FilterCertificatesBySubjectDN: accept certificates issued for these subjects (optional)
(1g)
Default method via SignRSA interface: See setRSA() for details.
(1h)
Default method, private key provided, self-signed certificate created on the fly:
  • Method: m_default
  • CommonName: signer's name
  • CertificatePrivateKey: private key for the self-signed certificate
(1i)
Default method, user may select certificate or choose to create a self-signed certificate, the private key of which is provided:
  • Method: m_default
  • SelectCertificate: csf_software and/or csf_hardware
  • CommonName: signer's name (for self-signed certificate)
  • CertificatePrivateKey: private key for the self-signed certificate
(1j)
Default method, user may select certificate or choose to "create" a self-signed certificate, the certificate to be used in that case and its key are provided separately:
(1k)
Default method, user may select certificate or choose to "create" a self-signed certificate, the certificate to be used in that case and its key are provided as PKCS #12 blob:
(2a)
PKCS #7 or CAdES, private key and self-signed certificate created on the fly:
(2b)
PKCS #7 or CAdES, the certificate and its key are provided as PKCS #12 blob:
(2c)
PKCS #7 or CAdES, private key provided, certificate provided:
(2d)
PKCS #7 or CAdES, user must select certificate:
(2e)
PKCS #7 or CAdES, user may select certificate or choose to create a self-signed certificate, the private key of which will be generated:
(2f)
PKCS #7 or CAdES, the certificate is selected programmatically or by the PDF document without user interaction:
(2g)
PKCS #7 or CAdES via SignRSA interface:
  • Method: m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1, or m_digsig_cades_detached
See setRSA() for details.
(2h)
PKCS #7 or CAdES, private key provided, self-signed certificate created on the fly:
(2i)
PKCS #7 or CAdES, user may select certificate or choose to create a self-signed certificate, the private key of which is provided:
(2j)
PKCS #7 or CAdES, user may select certificate or choose to "create" a self-signed certificate, the certificate to be used in that case and its key are provided separately:
(2k)
PKCS #7 or CAdES, user may select certificate or choose to "create" a self-signed certificate, the certificate to be used in that case and its key are provided as PKCS #12 blob:
(2l)
PKCS #7 or CAdES via SignPKCS7 interface: See setPKCS7() for details.
(3a)
PKCS #1, private key and self-signed certificate created on the fly:
  • Method: m_digsig_pkcs1
  • CommonName: signer's name
  • GenerateKeyPair: 1024-4096
(3b)
PKCS #1 via SignRSA interface:
  • Method: m_digsig_pkcs1
See setRSA() for details.
(3c)
PKCS #1, private key provided, self-signed certificate created on the fly:
  • Method: m_digsig_pkcs1
  • CommonName: signer's name
  • CertificatePrivateKey: private key for the self-signed certificate
(3d)
PKCS #1, private key provided, self-signed certificate provided:
  • Method: m_digsig_pkcs1
  • Certificate: self-signed certificate
  • CertificatePrivateKey: private key for the certificate

Additionally:

For TIFF documents, an additional, simplified signing method is available:

(4)
just a hash:
  • Method: m_hash
  • CommonName: signer's name

The following name parameters control the signing method and related aspects of the signature:

The following named parameters control the private key used for signing:

The following named parameters control rendering of the signature image from biometric data:

The following named parameters put additional data into the signature:

The following named parameters provide texts for the appearance of a signature in PDF documents:

The following named parameters control how a signed signature field in a PDF document will look like:

The following named parameters control the signing certificate:

The following named 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 named parameters are used for putting biometric data (handwritten signature) into the signature:

The following named parameters control the certificate selection dialog:

The following named parameters control RFC 3161 timestamps:

The following named parameters put additional certificates and revocation information into the signature:

The following named parameters do not fall into the above categories:


Member Function Documentation

synchronized int de.softpro.doc.SignDocSignatureParameters.addTextItem ( int  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():

ProfileValue
"" ti_signer/tg_master, ti_sign_time/tg_master
"image"(empty)
Parameters:
[in]aItemSelect the string to be added (ti_signer etc.)
[in]aGroupThe string's group for font size computation (tg_master or tg_slave).
Returns:
rc_ok if successful.
See also:
clearTextItems(), tg_master, tg_slave, ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_signer, ti_sign_time, ti_text1
synchronized int de.softpro.doc.SignDocSignatureParameters.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.

Returns:
rc_ok if successful.
See also:
addTextItem()
synchronized void de.softpro.doc.SignDocSignatureParameters.destroy (  ) throws SignDocException

Destroy this object, overwriting sensitive data.

After calling this method, all methods of this object will throw.

void de.softpro.doc.SignDocSignatureParameters.finalize (  ) throws Throwable [protected]

Finalize this object.

Do not call this method unless you know what you are doing.

synchronized int de.softpro.doc.SignDocSignatureParameters.getAvailableMethods (  ) throws SignDocException

Get a bitset indicating which signing methods are available for this signature field.

Returns:
1<<m_digsig_pkcs1 etc.
See also:
SignDocDocument.getAvailableMethods()
synchronized String de.softpro.doc.SignDocSignatureParameters.getErrorMessage (  ) throws SignDocException

Get an error message for the last function call.

Returns:
A string describing the reason for the failure of the last function call. The string is empty if the last call succeeded.
synchronized int de.softpro.doc.SignDocSignatureParameters.getState ( String  aName ) throws SignDocException

Get the status of a parameter.

Parameters:
[in]aNameThe name of the parameter (case-sensitive).
Returns:
The status of the parameter: ps_set, ps_supported, ps_not_supported, or ps_unknown.
See also:
ps_set, ps_supported, ps_not_supported, ps_unknown
synchronized int de.softpro.doc.SignDocSignatureParameters.setBlob ( String  aName,
byte[]  aData 
) throws SignDocException

Set a blob parameter.

Available blob parameters are:

  • BiometricData The biometric data must be in SignWare format (created by SPFlatFileCreateFromSignature()). The biometric data is stored in the document (see integer parameter "BiometricEncryption") and will be used for rendering the signature image if integer parameter "RenderSignature" is non-zero (unless a signature image is specified by blob parameter "Image").
  • BiometricKey The public key (be_rsa) or the AES key (be_binary) for encrypting the biometric data. See also string parameter "BiometricKeyPath" and Encryption of biometric data.
  • Certificate The certificate for the signature. The blob must contain a serialized X.509 certificate (DER or PEM) and blob parameter "CertificatePrivateKey" must contain the private key for that certificate. Alternatively, for PKCS #7 signatures and CAdES detached signatures, the blob may contain the certificate and its private key in PKCS #12 format; string parameter "PKCS#12Password" contains the password for extracting the private key.
  • CertificatePrivateKey The private key for the (self-signed) certificate in PKCS #1 format (DER or PEM). If a certificate is passed in blob parameter "Certificate", this parameter must contain the private key for that certificate. If a self-signed certificate is to be generated, the private key can be either set with this parameter or generated with integer parameter "GenerateKeyPair".
  • FilterCertificatesByIssuerCertificate Acceptable issuer certificates. Setting this parameter adds the specified DER-encoded certificate to a list of acceptable issuer certificates. Pass null to clear the list. A PDF document may contain (in its certificate seed value dictionaries) additional restrictions for acceptable issuer certificates. A signer certificate is acceptable for the rule defined by this parameter if it chains up to any of the certificates in the list of acceptable issuer certificates. SignDocDocument.addSignature() will fail if no matching certificate is available for signing. Note that csf_software and/or csf_hardware must be included in integer parameter "SelectCertificate" to make certificates available at all.
  • FilterCertificatesBySubjectCertificate Acceptable certificates. Setting this parameter adds the specified DER-encoded certificate to a list of acceptable certificates. Pass null to clear the list. A PDF document may contain (in its certificate seed value dictionaries) additional restrictions for acceptable certificates. SignDocDocument.addSignature() will fail if no matching certificate is available for signing. Note that csf_software and/or csf_hardware must be included in integer parameter "SelectCertificate" to make certificates available at all.
  • Image The signature image. The image can be in BMP, JPEG, PNG, or TIFF format. If no image is set (or rendered, see integer parameter "RenderSignature"), the signature field may or may not show an image computed from the biometric data, depending on the document type and signature field type. This parameter overrides integer parameter "RenderSignature". See also integer parameter "ImageTransparency".
  • IntermediateCertificate An intermediate certificate for the signature. The blob must contain a DER-encoded X.509 certificate or one or more PEM-encoded X.509 certificates. See also integer parameter "AddCertificates".

Additionally, you can store your own blobs in the signature by using a name starting with "Prop_", except for "Prop_AuthTime", "Prop_AuthType", "Prop_BiometricData", and "Prop_Build", see de.softpro.doc.SignDocVerificationResult.getSignatureString(). The name shall contain the following characters only: 0-9, a-z, A-Z, '-', and '_'.

Parameters:
[in]aNameThe name of the parameter (case-sensitive).
[in]aDataThe value.
Returns:
rc_ok if successful.
Todo:
support PKCS #7 for "Certificate"
synchronized int de.softpro.doc.SignDocSignatureParameters.setColor ( String  aName,
SignDocColor  aValue 
) throws SignDocException

Set a color parameter.

Available color parameters are:

  • SignatureColor The foreground color for the rendered signature (see integer parameter "RenderSignature"). The default color is black.
  • TextColor The color to be used for text in the appearance of a DigSig signature field in a PDF document. If this parameter is not set, the color will be taken from the field's text field attributes. If the field doesn't have text field attributes, the document's text field attributes will be used. If this also fails, the text will be black. See also string parameter "FontName" and length parameter "FontSize".
Parameters:
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns:
rc_ok if successful.
synchronized int de.softpro.doc.SignDocSignatureParameters.setInteger ( String  aName,
int  aValue 
) throws SignDocException

Set an integer parameter.

Available integer parameters are:

  • AddCertificates This parameter controls inclusion of intermediate and root certificates. The value is ac_none, ac_all, or ac_trusted. The default value is ac_all. If you are using setPKCS7(), you'll have to include the certificates yourself. See also integer parameter "AddRevocationInfo" and blob parameter "IntermediateCertificate".
  • AddRevocationInfo This parameter controls inclusion of revocation data (CRL and OCSP) for the signing certificate (unless it is self-signed) and the intermediate certificates. See ari_add. If the parameter is zero (which is the default value), revocation data won't be included. If the signature field has a mandatory AddRevInfo seed value, with value true, AddRevocationInfo is assumed to have ari_add set. If revocation data is to be added, integer parameter "Method" must be set to m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1, or m_digsig_cades_detached, otherwise signing will fail. Integer parameter "AddCertificates" must be ac_all or ac_trusted, otherwise signing will fail. If revocation data is to be included, vf_check_revocation is assumed to be set in the value of integer parameter "VerificationFlags" of the verification parameters. Integer parameter "VerificationModel" of addSignature()'s aVerificationParameters is assumed to be vm_chain if it is vm_minimal (to enable inclusion of all certificates but the root certificate). If revocation data cannot be retrieved or if any of the certificates for which revocation information is retrieved is revoked or has unknown revocation status, signing will fail. If you are using setPKCS7(), you'll have to include revocation information yourself.
  • BiometricEncryption Specifies how biometric data is to be encrypted (be_rsa, be_fixed, be_binary, be_passphrase, or be_dont_store). If not set, biometric data will not be embedded in the signature.
  • CertificateSigningAlgorithm The signing algorithm for the self-signed certificate (csa_sha1_rsa, csa_md5_rsa, csa_sha256_rsa, csa_sha384_rsa, csa_sha512_rsa, or csa_ripemd160_rsa). When a self-signed certificate is to be generated, the signing algorithm can be set. If not set, a suitable default value will be used.
  • DetachedHashAlgorithm Hash algorithm to be used for a detached signature (ie, if integer parameter "Method" is m_digsig_pkcs7_detached or m_digsig_cades_detached). Use dha_default, dha_sha1, dha_sha256, dha_sha384, dha_sha512, or dha_ripemd160. The default value is dha_default. See also integer parameters "Method" and "IgnoreSeedValues".
  • GenerateKeyPair Start generation of a key pair for the self-signed certificate. The value is the number of bits (1024 through 4096, multiple of 8). When a self-signed certificate is to be generated, the private key can be either be generated by setting this parameter or set as blob parameter "CertificatePrivateKey".
  • IgnoreSeedValues Specifies what entries in the signature field seed value dictionary shall be ignored. This parameter contains a combination of isv_DigestMethod and isv_SubFilter. The default value is 0 which means that signing might fail due to a conflict between integer parameters "Method" and "DetachedHashAlgorithm" on one hand and the SubFilter and DigestMethod entries of the signature field seed value dictionary on the other hand. The Cert entry of the signature field seed value dictionary is currently ignored by default, see csf_use_certificate_seed_values of integer parameter "SelectCertificate". This parameter is ignored for TIFF documents.
  • ImageHAlignment The horizontal alignment of the image (ha_left, ha_center, ha_right, or ha_justify). For DigSig signature fields, this parameter defines the horizontal alignment of the image in the appearance stream of PDF documents. The default value depends on the profile passed to SignDocDocument.createSignatureParameters():
    ProfileValue
    "" ha_center
    "image"ha_center
  • ImageVAlignment The vertical alignment of the image (va_top, va_center, or va_bottom). For DigSig signature fields, this parameter defines the vertical alignment of the image in the appearance stream of PDF documents. The default value depends on the profile passed to SignDocDocument.createSignatureParameters():
    ProfileValue
    "" va_top
    "image"va_center
  • ImageTransparency Image transparency (it_opaque or it_brightest). For DigSig signature fields, this parameter defines how to handle transparency for signature image (either the image passed in the "Image" blob parameter or the image computed according to the "RenderSignature" integer parameter). The default value is it_brightest.
  • Method The signing method (m_default, m_digsig_pkcs1, m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1, m_hash, or m_digsig_cades_detached). The default value is m_default. See also integer parameters "DetachedHashAlgorithm" and "IgnoreSeedValues".
  • Optimize Set whether this is the first signature of the document and the document shall be optimized or whether the document shall not be optimized. Use o_optimize or o_dont_optimize. For PDF documents, o_optimize requires saving to a new file, see string parameter "OutputPath". The default value is o_dont_optimize. If the return value of getRequiredSaveToFileFlags() includes sf_incremental, signing with this parameter set to o_optimize will fail.
  • PDFAButtons Set whether appearance streams of check boxes and radio buttons shall be frozen (fixed) for PDF/A compliance before signing. Use pb_freeze, pb_dont_freeze, or pb_auto. The default value is pb_auto.
  • PenWidth Pen width for rendering the signature (see blob parameter "BiometricData") for the signature image. Ignored unless integer parameter "RenderSignature" is non-zero. The pen width is specified in micrometers, the default value is 500 (0.5mm).
  • RenderSignature Specifies whether and how the signature (see blob parameter "BiometricData") is to be rendered for the signature image. This parameter contains 0, rsf_bw, rsf_gray. or rsf_antialias. If this value is 0, the signature won't be rendered. If no image is rendered (or set, see blob parameter "Image"), the signature field may or may not show an image computed from the biometric data, depending on the document type and signature field type. This parameter is ignored if blob parameter "Image" is set. The default value is 0. See also integer parameters "ImageTransparency", "PenWidth", and "RenderWidth" and color parameter "SignatureColor". "RenderSignature" is not supported under iOS and Android.
  • RenderWidth Specifies the width (in pixels) for the signature image rendered from biometric data for PDF documents. This parameter is ignored for TIFF documents. The default value is 600. If the signature is higher than wide, this value specified the height of the signature image.
  • SelectCertificate Let the user and/or the application select the certificate for the signature. The parameter contains a combination of csf_software, csf_hardware, csf_ask_if_ambiguous, csf_never_ask, csf_create_self_signed, and csf_use_certificate_seed_values. If this parameter is zero (which is the default value), the user won't be asked and the certificate will either be generated on the fly or be supplied by the "Certificate" blob parameter and SignDocDocument.addSignature() will fail if the PDF document restricts acceptable certificates by means of a certificate seed value dictionary. This parameter is not yet implemented for Linux, iOS, Android, OS X, and Windows Store apps. See also string parameters "SelectCertificateMessage" and "SelectCertificateTitle".
  • TextHAlignment The horizontal alignment of text lines (ha_left, ha_center, ha_right, or ha_justify). For DigSig signature fields, this parameter defines the horizontal alignment of text lines in the appearance stream of PDF documents. The default value depends on the profile passed to SignDocDocument.createSignatureParameters():
    ProfileValue
    "" ha_center
    "image"ha_center
  • TextPosition The position of the text block w.r.t. the image (tp_above, tp_below, tp_left_of, tp_overlay, tp_right_of or tp_underlay). For DigSig signature fields, this parameter defines the position of the text block in the appearance stream of PDF documents. The default value depends on the profile passed to SignDocDocument.createSignatureParameters():
    ProfileValue
    "" tp_below
    "image"tp_overlay
  • TextVAlignment The vertical alignment of text lines (va_top, va_center, or va_bottom). For DigSig signature fields, this parameter defines the vertical alignment of text lines in the appearance stream of PDF documents. The default value depends on the profile passed to SignDocDocument.createSignatureParameters():
    ProfileValue
    "" va_bottom
    "image"va_center
  • TimeStampHashAlgorithm Hash algorithm for RFC 3161 time-stamps. See tsha_default, tsha_sha1, tsha_sha256, tsha_sha384, and tsha_sha512. The default value is tsha_default. See also string parameter "TimeStampServerURL".
  • TimeStampRetries The maximum number of retries for obtaining an RFC 3161 timestamp after a timeout. The default value is 0. See also string parameter "TimeStampServerURL".
  • TimeStampServerTimeout Time out in milliseconds for retrieving a time stamp from an RFC 3161 time-stamp server. The value must be positive. The default value is 10000. See also string parameter "TimeStampServerURL".
  • TimeStampSize If the value of this parameter is positive, add this many octets for the RFC 3161 timestamp to the anticipated size of the PKCS #7 message. If the value is zero or negative, a dummy time stamping request will be sent to the time-stamp server and the value of this parameter will be subtracted from the size of the response; as the response will be wrapped in an attribute, the value of this parameter should be smaller than -25. The default value is 8192. See also string parameter "TimeStampServerURL".
Parameters:
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns:
rc_ok if successful.
Todo:

document when "SelectCertificate" presents the dialog

implement "SelectCertificate" for Linux

synchronized int de.softpro.doc.SignDocSignatureParameters.setLength ( String  aName,
int  aType,
double  aValue 
) throws SignDocException

Set a length parameter.

Available length parameters are:

  • FontSize The maximum font size. For DigSig signature fields, this parameter defines the maximum font size for the appearance stream of PDF documents. The font size will be reduced to make all text lines fit horizontally into the signature field. The default value depends on the profile passed to SignDocDocument.createSignatureParameters():
    ProfileValue
    "" vt_field_height and 0.1
    "image"vt_field_height and 0.1
    See also string parameter "FontName" and color parameter "TextColor".
  • ImageMargin The margin to add around the image. For DigSig signature fields, this parameter defines the margin to be added around the image in the appearance stream of PDF documents. This margin is added at all four edges of the image. The default value depends on the profile passed to SignDocDocument.createSignatureParameters():
    ProfileValue
    "" vt_abs and 1.0
    "image"vt_abs and 1.0
  • TextHMargin The horizontal margin for text. For DigSig signature fields, this parameter defines the horizontal margin of text in the appearance stream of PDF documents. If the text is justified, aValue/2 will be used for the two margins. If the text is centered, this value will be ignored. The default value depends on the profile passed to SignDocDocument.createSignatureParameters():
    ProfileValue
    "" vt_field_height and 0.1
    "image"vt_field_height and 0.1
Parameters:
[in]aNameThe name of the parameter (case-sensitive).
[in]aTypeDefine how the length is specified (vt_abs, vt_field_height, or vt_field_width).
[in]aValueThe value of the parameter.
Returns:
rc_ok if successful.
See also:
vt_abs, vt_field_height, vt_field_width
synchronized int de.softpro.doc.SignDocSignatureParameters.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:

  • CommonName must not be set
  • Country must not be set
  • Locality must not be set
  • Organization must not be set
  • OrganizationUnit must not be set

Requirements for integer parameters:

Requirements for blob parameters:

  • Certificate must not be set
  • CertificatePrivateKey must not be set

The SignPKCS7 interface is quite hard to use, please use setRSA() and the SignRSA interface instead.

Parameters:
[in]aPKCS7The object that will create the PKCS #7 or CAdES signature.
Returns:
rc_ok if successful.
See also:
setRSA()
synchronized int de.softpro.doc.SignDocSignatureParameters.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 integer parameters:

  • GenerateKeyPair must not be set
  • SelectCertificate must be zero (which is the default value)

Requirements for blob parameters:

  • Certificate must not be set
  • CertificatePrivateKey must not be set
Parameters:
[in]aRSAThe object that will compute the RSA signature.
Returns:
rc_ok if successful.
See also:
setPKCS7()
synchronized int de.softpro.doc.SignDocSignatureParameters.setString ( String  aName,
String  aValue 
) throws SignDocException

Set a string parameter.

Available string parameters are:

  • Adviser The adviser. For DigSig signature fields, the adviser may be used for the appearance stream of PDF documents (see ti_adviser). The default value is empty. Complex scripts are supported, see Complex Scripts.
  • BiometricKeyPath The pathname of a file containing the public key in PKCS #1 or X.509 format for encrypting the biometric data with integer parameter "BiometricEncryption" set to be_rsa. See also blob parameter "BiometricKey" and Encryption of biometric data.
  • BiometricPassphrase Passphrase to be used if integer parameter "BiometricEncryption" is be_passphrase. Should contain ASCII characters only.
  • Comment The comment. For DigSig signature fields, the comment may be used for the appearance stream of PDF documents (see ti_comment). The comment can contain multiple lines which are separated by '
    '. The default value is empty. Complex scripts are supported, see Complex Scripts.
  • CommonName The common name for the self-signed certificate. When a self-signed certificate is to be generated, the common name (CN) must be set. See also string parameter "Signer".
  • ContactInfo The contact information provided by the signer. For DigSig signature fields, the contact information will be stored in the digital signature. For DigSig signature fields, the contact information may be used for the appearance stream of PDF documents (see ti_contact_info). The default value is empty. Complex scripts are supported, see Complex Scripts.
  • Country The country name for the self-signed certificate. When a self-signed certificate is to be generated, the country name (C) should be set. Use ISO 3166 country codes. The default value is empty.
  • Filter The name of the preferred filter. For DigSig signature fields, the filter name will be stored in the digital signature. The default value is "SOFTPRO DigSig Security". You might want to set the filter to "Adobe.PPKLite".
  • FilterCertificatesByPolicy A required certificate policy. Setting this parameter adds the specified OID to a list of required policy object identifiers. All specified policies are required for a certificate to be accepted. Pass an empty value to clear the list. The value must be a valid ASN.1 object identifier. A PDF document may contain (in its certificate seed value dictionaries) additional restrictions for acceptable certificates. SignDocDocument.addSignature() will fail if no matching certificate is available for signing. Note that csf_software and/or csf_hardware must be included in integer parameter "SelectCertificate" to make certificates available at all.
  • FilterCertificatesBySubjectDN An acceptable subject Distinguished Name (DN). Setting this parameter adds the specified DN to a list of acceptable DNs. Pass an empty value to clear the list. The DN must be formatted according to RFC 4514, using short names for the attribute types. Multi-valued RDNs and multiple RDNs specifying a value for the same attribute are not allowed. A PDF document may contain (in its certificate seed value dictionaries) additional restrictions for acceptable certificates. SignDocDocument.addSignature() will fail if no matching certificate is available for signing. Note that csf_software and/or csf_hardware must be included in integer parameter "SelectCertificate" to make certificates available at all.
  • FontName The name of the font to be used for text in the appearance of a DigSig signature field in a PDF document. The font name can be the name of a standard font, the name of an already embedded font, or the name of a font defined by a font configuration file. If the name is empty, the font name will be taken from the field's text field attributes. If the field doesn't have text field attributes, the document's text field attributes will be used. If this also fails, standard font Helvetica will be used (which will break PDF/A compliance). The default value is empty. See also length parameter "FontSize" and color parameter "TextColor".
  • Locality The location name for the self-signed certificate. When a self-signed certificate is to be generated, the location name (L) should be set. The default value is empty. Do not confuse "Locality" and "Location"!
  • Location The host name or physical location of signing. For DigSig signature fields, the location will be stored in the digital signature. For DigSig signature fields, the location may be used for the appearance stream of PDF documents (see ti_location). The default value is empty. Complex scripts are supported, see Complex Scripts. Do not confuse "Location" and "Locality"!
  • Organization The organization name for the self-signed certificate. When a self-signed certificate is to be generated, the organization name (O) should be set. The default value is empty.
  • OrganizationUnit The organization unit name for the self-signed certificate. When a self-signed certificate is to be generated, the organization unit name (OU) should be set. The default value is empty.
  • OutputPath Specify the file to which the signed document shall be saved. If this parameter is empty and the document is backed by a file (ie, the last load or save operation was from or to a file, respectively), the signed document will be written to that file. The special value "<memory>" causes the document to be saved to and signed in memory (available for PDF documents only). See also integer parameter "Optimize". The default value is empty.
  • PKCS#12Password The password for extracting the private key from the PKCS #12 blob set as blob parameter "Certificate". The password must contain ASCII characters only.
  • Reason The reason for the signing. For DigSig signature fields, the reason will be stored in the digital signature. For DigSig signature fields, the reason may be used for the appearance stream of PDF documents (see ti_reason). The default value is empty. Complex scripts are supported, see Complex Scripts.
  • SelectCertificateMessage A message to be displayed in the certificate selection dialog, see integer parameter "SelectCertificate".
  • SelectCertificateTitle The title of the certificate selection dialog, see integer parameter "SelectCertificate". A localized version of "Select Certificate" will be used if empty or not set.
  • Signer The signer name. This is the signer name that will be stored in the digital signature. If not set, the name will be taken from the certificate. For DigSig signature fields, the signer name may be used for the appearance stream of PDF documents (see ti_signer). The default value is empty (meaning that the name will be taken from the signing certificate). See also string parameter "CommonName". Complex scripts are supported, see Complex Scripts.
  • SignTime The time of signing in free format. For DigSig signature fields, the time of signing may be used for the appearance stream of PDF documents (see ti_sign_time). The default value is empty. See also string parameter "Timestamp".
  • Text1 A text to be included in the appearance stream of DigSig signature fields in PDF documents (see ti_text1). The text can contain multiple lines which are separated by '
    '. The default value is empty. Complex scripts are supported, see Complex Scripts.
  • Text2 See Text1 and ti_text2.
  • Text3 See Text1 and ti_text3.
  • Text4 See Text1 and ti_text4.
  • Text5 See Text1 and ti_text5.
  • Text6 See Text1 and ti_text6.
  • Text7 See Text1 and ti_text7.
  • Text8 See Text1 and ti_text8.
  • Text9 See Text1 and ti_text9.
  • Timestamp The timestamp to be used in the digital signature (instead of the current time). ISO 8601 format must be used: "yyyy-mm-ddThh:mm:ss" with optional timezone. For DigSig signature fields, the timestamp will be stored in the signature dictionary (transformed suitably for the M entry). If empty, the current time will be used. The default value is empty. If this parameter is set to a non-empty value, no time stamp will be retrieved from an RFC 3161 time-stamp server, even if specified by the signature field seed value dictionary. Do not set this parameter if a self-signed certificate is to be created. See also string parameters "SignTime" and "TimeStampServerURL".
  • TimeStampClientCertificatePath The pathname of a file containing the certificate in PEM format for authenticating to an RFC 3161 time-stamp server over HTTPS. If the is non-empty, string parameter "TimeStampClientKeyPath" must also be set. If the value is empty, the client won't authenticate itself. The default value is empty. See also string parameters "TimeStampServerURL" and "TimeStampClientKeyPath".
  • TimeStampClientKeyPath The pathname of a file containing the private key in PEM format for authenticating to an RFC 3161 time-stamp server over HTTPS. If the is non-empty, string parameter "TimeStampClientCertificatePath" must also be set. If the value is empty, the client won't authenticate itself. The default value is empty. See also string parameters "TimeStampServerURL", and "TimeStampClientKeyPath".
  • TimeStampServerPassword The password for Basic/Digest HTTP authentication to the time-stamp server. Non-ASCII values probably don't work. If this parameter is set, string parameter "TimeStampServerUser" must also be set.
  • TimeStampServerURL The URL of an RFC 3161 time-stamp server. If string parameter "Timestamp" is empty and string parameter "TimeStampServerURL" is non-empty, a time stamp will be obtained from a time-stamp server. The scheme of the URL must be either "http" or "https". The time-stamp server URL specified by the document's signature field seed value dictionary overrides the "TimeStampServerURL" parameter. An error will be returned by SignDocDocument.addSignature() if a time-stamp server is to be used and integer parameter "Method" is not m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1, or m_digsig_cades_detached. See also integer parameters "TimeStampHashAlgorithm", "TimeStampRetries", "TimeStampServerTimeout", and "TimeStampSize", and string parameters "TimeStampClientCertificatePath", "TimeStampClientKeyPath", "TimeStampServerPassword", "TimeStampServerUser", and "TimeStampUserAgent". See also SignDocDocumentLoader.loadTrustedCertificatesFromFile().
  • TimeStampServerUser The user name for Basic/Digest HTTP authentication to the time-stamp server. Non-ASCII values probably don't work. If this parameter is set, string parameter "TimeStampServerPassword" must also be set.
  • TimeStampUserAgent The value of the User-Agent header field sent to the time-stamp server. The default value is "SignDoc".

Additionally, you can store your own strings in the signature by using a name starting with "Prop_", except for "Prop_AuthTime", "Prop_AuthType", "Prop_BiometricData", and "Prop_Build", see de.softpro.doc.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.

Parameters:
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns:
rc_ok if successful.

Member Data Documentation

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.

See also:
ac_none, ac_trusted

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.

See also:
ac_all, ac_trusted

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.

See also:
ac_all, ac_none

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.

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".

See also:
setInteger(), setBlob(), be_dont_store, be_fixed, be_passphrase, be_rsa

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.

See also:
setInteger(), setString(), setBlob(), be_binary, be_fixed, be_passphrase, be_rsa

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".

See also:
setInteger(), be_binary, be_dont_store, be_passphrase, be_rsa

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".

See also:
setInteger(), setString(), setBlob(), be_binary, be_dont_store, be_fixed, be_rsa

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".

See also:
setInteger(), setBlob(), setString(), be_binary, be_dont_store, be_fixed, be_passphrase, Encryption of biometric data

Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): MD5 with RSA.

See also:
setInteger(), csa_ripemd160_rsa, csa_sha1_rsa, csa_sha256_rsa, csa_sha384_rsa, csa_sha512_rsa

Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-512 with RSA.

See also:
setInteger(), csa_md5_rsa, csa_sha1_rsa, csa_sha256_rsa, csa_sha384_rsa, csa_sha512_rsa

Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-1 with RSA.

See also:
setInteger(), csa_md5_rsa, csa_ripemd160_rsa, csa_sha256_rsa, csa_sha384_rsa, csa_sha512_rsa

Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-256 with RSA.

See also:
setInteger(), csa_md5_rsa, csa_ripemd160_rsa, csa_sha1_rsa, csa_sha384_rsa, csa_sha512_rsa

Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-384 with RSA.

See also:
setInteger(), csa_md5_rsa, csa_ripemd160_rsa, csa_sha1_rsa, csa_sha256_rsa, csa_sha512_rsa

Signing algorithms for self-signed certificates (for integer parameter "CertificateSigningAlgorithm"): SHA-512 with RSA.

See also:
setInteger(), csa_md5_rsa, csa_ripemd160_rsa, csa_sha1_rsa, csa_sha256_rsa, csa_sha384_rsa

Flags for selecting certificates (for integer parameter "SelectCertificate": ask the user to select a certificate if there is more than one matching certificate.

See also:
setInteger(), csf_hardware, csf_software, csf_create_self_signed, csf_never_ask, csf_use_certificate_seed_values

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).

If neither csf_ask_if_ambiguous nor csf_never_ask is included, the certificate selection dialog will be displayed.

See also:
setInteger(), csf_hardware, csf_software

Flags for selecting certificates (for integer parameter "SelectCertificate": include hardware-based certificates.

See also:
setInteger(), csf_software, csf_create_self_signed, csf_ask_if_ambiguous, csf_never_ask, csf_use_certificate_seed_values

Flags for selecting certificates (for integer parameter "SelectCertificate": never ask the user to select a certificate; exactly one certificate must match.

If neither csf_ask_if_ambiguous nor csf_never_ask is included, the certificate selection dialog will be displayed.

See also:
setInteger(), csf_hardware, csf_software, csf_create_self_signed, csf_never_ask, csf_use_certificate_seed_values

Flags for selecting certificates (for integer parameter "SelectCertificate": include software-based certificates.

See also:
setInteger(), csf_hardware, csf_create_self_signed, csf_ask_if_ambiguous, csf_never_ask, csf_use_certificate_seed_values

Flags for selecting certificates (for integer parameter "SelectCertificate": include only certificates allowed by the PDF document's certificate seed value dictionary.

See also:
setInteger(), csf_ask_if_ambiguous, csf_hardware, csf_software, csf_create_self_signed, csf_never_ask

Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): default hash algorithm.

Use the hash algorithm specified by the the DigestMethod values of the signature field seed value dictionary or, if not present, SHA-256 (if supported), or SHA-1 (as last resort).

See also:
setInteger(), dha_ripend160, dha_sha1, dha_sha256, dha_sha384, dha_sha512

Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): RIPEMD-160.

dha_ripemd160 is not supported under Windows.

See also:
setInteger(), dha_default, dha_sha1, dha_sha256, dha_sha384, dha_sha512

Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): SHA-1.

See also:
setInteger(), dha_default, dha_ripend160, dha_sha256, dha_sha384, dha_sha512

Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): SHA-256.

dha_sha256 is supported under Linux, iOS, Android, and under Windows XP SP3 and later. If dha_sha256 is selected but not supported, SignDocDocument.addSignature() will fall back to dha_sha1.

See also:
setInteger(), dha_default, dha_ripend160, dha_sha1, dha_sha384, dha_sha512

Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): SHA-384.

dha_sha384 is supported under Linux, iOS, Android, and under Windows XP SP3 and later. If dha_sha384 is selected but not supported, SignDocDocument.addSignature() will fall back to dha_sha1.

See also:
setInteger(), dha_default, dha_ripend160, dha_sha1, dha_sha256, dha_sha512

Hash algorithm to be used for a detached signature (for integer parameter "DetachedHashAlgorithm"): SHA-512.

dha_sha512 is supported under Linux, iOS, Android, and under Windows XP SP3 and later. If dha_sha512 is selected but not supported, SignDocDocument.addSignature() will fall back to dha_sha1.

See also:
setInteger(), dha_default, dha_ripend160, dha_sha1, dha_sha256, dha_sha384

Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment": center.

See also:
setInteger(), ha_justify, ha_left, ha_right

Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment": justify.

See also:
setInteger(), ha_center, ha_left, ha_right

Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment": left.

See also:
setInteger(), ha_center, ha_justify, ha_right

Horizontal alignment (for integer parameters "ImageHAlignment" and "TextHAlignment": right.

See also:
setInteger(), ha_center, ha_justify, ha_left

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 the hash algorithm specified by integer parameter "DetachedHashAlgorithm" is not dha_default (or is implied by integer parameter "Method") and is not listed in the DigestMethod entry of the signature field seed value dictionary.

If this flag is set, you can override the DigestMethod entry of the signature field seed value dictionary with integer parameter "DestachedHashAlgorithm" and/or "Method" without risking failure of signing due to a conflict with DigestMethod.

See also:
setInteger(), isv_SubFilter

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.

See also:
setInteger(), isv_DigestMethod

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.

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.

See also:
setInteger(), it_brightest

Signing method (for integer parameter "Method"): default method.

Use the method specified by the 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).

See also:
setInteger(), m_digsig_cades_detached, m_digsig_pkcs1, m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1, m_hash

Signing method (for integer parameter "Method"): Detached ETSI CAdES (PAdES-BES).

See also:
setInteger(), m_default, m_digsig_pkcs1, m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1, m_hash

Signing method for SignDocVerificationResult.getMethod(): Detached ETSI CAdES RFC 3161 time stamp.

Not yet supported for signing.

See also:
m_digsig_pkcs1, m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1, m_hash, m_digsig_cades_detached

Signing method (for integer parameter "Method"): PKCS #1.

See also:
setInteger(), m_default, m_digsig_cades_detached, m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1, m_hash

Signing method (for integer parameter "Method"): detached PKCS #7.

See also:
setInteger(), m_default, m_digsig_cades_detached, m_digsig_pkcs1, m_digsig_pkcs7_sha1, m_hash

Signing method (for integer parameter "Method"): PKCS #7 with SHA-1 (deprecated).

See also:
setInteger(), m_default, m_digsig_cades_detached, m_digsig_pkcs1, m_digsig_pkcs7_detached, m_hash

Signing method (for integer parameter "Method"): The signature is just a hash (TIFF only).

See also:
setInteger(), m_default, m_digsig_cades_detached, m_digsig_pkcs1, m_digsig_pkcs7_detached, m_digsig_pkcs7_sha1

Don't optimize document before signing (for integer parameter "Optimize").

See also:
setInteger()

Optimize document before signing (for integer parameter "Optimize").

See also:
setInteger()

Freeze (fix) appearances before signing if appropriate (for integer parameter "PDFAButtons").

Freeze (fix) appearances if the document claims to be PDF/A-1-compliant and if there are no signed signature fields.

See also:
setInteger()

Don't freeze (fix) appearances before signing (for integer parameter "PDFAButtons").

See also:
setInteger()

Freeze (fix) appearances before signing (for integer parameter "PDFAButtons").

Using pb_freeze is equivalent to saving the document with SignDocDocument.sf_pdfa_buttons before signing.

See also:
setInteger()

Status of a parameter: Parameter can be (or is) set but will be ignored.

ps_ignored is currently not used.

See also:
getState(), ps_not_supported, ps_set, ps_supported, ps_unknown

Status of a parameter: Parameter must be set but is not set.

ps_missing is currently not used.

See also:
getState(), ps_not_supported, ps_set, ps_supported, ps_unknown

Status of a parameter: Parameter is not supported for this field.

See also:
getState(), ps_set, ps_supported, ps_unknown

Status of a parameter: Parameter has been set.

Most parameters have a default value such as the empty string which may be treated as "set" or "not set" depending on the implementation's fancy.

Don't make your code depend on the difference between ps_set and ps_supported.

See also:
getState(), ps_not_supported, ps_supported, ps_unknown

Status of a parameter: Parameter is supported and optional, but has not been set or is set to the default value.

Most parameters have a default value such as the empty string which may be treated as "set" or "not set" depending on the implementation's fancy.

Don't make your code depend on the difference between ps_set and ps_supported.

See also:
getState(), ps_not_supported, ps_set, ps_unknown

Status of a parameter: Unknown parameter.

See also:
getState(), ps_not_supported, ps_set, ps_supported

Return code for setter functions: The value for the parameter is invalid.

Return code for setter functions: Setting the parameter is not supported.

Return code for setter functions: Parameter set successfully.

Return code for setter functions: Unknown parameter.

Flags for rendering the signature (for integer parameter "RenderSignature": use gray levels for antialiasing.

rsf_bw, rsf_gray, and rsf_antialias are mutually exclusive.

See also:
setInteger(), rsf_bw, rsf_gray

Flags for rendering the signature (for integer parameter "RenderSignature": black and white.

rsf_bw, rsf_gray, and rsf_antialias are mutually exclusive.

See also:
setInteger(), rsf_gray, rsf_antialias

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.

See also:
setInteger(), rsf_bw, rsf_antialias

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.

See also:
addTextItem(), setLength(), tg_slave

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.

See also:
addTextItem(), setLength(), tg_master

Select a string for the appearance stream of PDF documents: String parameter "Adviser".

See also:
addTextItem(), setString(), ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Comment".

See also:
addTextItem(), setString(), ti_adviser, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "ContactInfo".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Location".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Reason".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "SignTime".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Signer".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Text1".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text2, ti_text3, ti_text4, ti_text5, ti_text6, ti_text7, ti_text8, ti_text9

Select a string for the appearance stream of PDF documents: String parameter "Text2".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Text3".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Text4".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Text5".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Text6".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Text7".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Text8".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Select a string for the appearance stream of PDF documents: String parameter "Text9".

See also:
addTextItem(), setString(), ti_adviser, ti_comment, ti_contact_info, ti_location, ti_reason, ti_sign_time, ti_signer, ti_text1

Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put above the image.

See also:
setInteger(), tp_below, tp_left_of, tp_overlay, tp_right_of, tp_underlay

Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put below the image.

See also:
setInteger(), tp_above, tp_left_of, tp_overlay, tp_right_of, tp_underlay

Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put on the left of the image.

See also:
setInteger(), tp_above, tp_below, tp_overlay, tp_right_of, tp_underlay

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).

See also:
setInteger(), tp_above, tp_below, tp_left_of, tp_right_of, tp_underlay

Position of the text block w.r.t. to the image (for integer parameter "TextPosition": Text is put on the right of the image.

See also:
setInteger(), tp_above, tp_below, tp_left_of, tp_overlay, tp_underlay

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).

See also:
setInteger(), tp_above, tp_below, tp_left_of, tp_overlay, tp_right_of

Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): default value.

Use the same hash algorithm as used for the document hash.

The hash algorithm requested for the document hash will be used for the time stamp even if the document hash falls back to SHA-1 (see dha_default).

See also:
setInteger(), tsha_sha1, tsha_sha256, tsha_sha384, tsha_sha512

Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): SHA-1.

See also:
setInteger(), tsha_default, tsha_sha256, tsha_sha384, tsha_sha512

Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): SHA-256.

tsha_sha256 is supported under Linux, iOS, Android, and under Windows XP SP3 and later.

See also:
setInteger(), tsha_default, tsha_sha1, tsha_sha384, tsha_sha512

Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): SHA-384.

tsha_sha384 is supported under Linux, iOS, Android, and under Windows XP SP3 and later.

See also:
setInteger(), tsha_default, tsha_sha1, tsha_sha256, tsha_sha512

Hash algorithm to be used for RFC 3161 timestamps (for integer parameter "TimeStampHashAlgorithm"): SHA-512.

tsha_sha512 is supported under Linux, iOS, Android, and under Windows XP SP3 and later.

See also:
setInteger(), tsha_default, tsha_sha1, tsha_sha256, tsha_sha384

Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": bottom.

See also:
setInteger(), va_center, va_top

Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": center.

See also:
setInteger(), va_bottom, va_top

Vertical alignment (for integer parameters "ImageVAlignment" and "TextVAlignment": top.

See also:
setInteger(), va_bottom, va_center

Indicate how measurements are specified: aValue is the value to be used (units of document coordinates).

See also:
setLength(), vt_field_height, vt_field_width

Indicate how measurements are specified: Multiply aValue by the field height.

See also:
setLength(), vt_abs, vt_field_width

Indicate how measurements are specified: Multiply aValue by the field width.

See also:
setLength(), vt_abs, vt_field_height

The documentation for this class was generated from the following file: