Click or drag to resize
SignDocSignatureParameterssetInteger Method
Set an integer parameter.

Namespace:  de.softpro.signdocsdk
Assembly:  SPSignDoc_4.3_DotNetLib (in SPSignDoc_4.3_DotNetLib.dll) Version: 1.0.6773.37566
Syntax
C#
public void setInteger(
	IntegerParameter name,
	int value
)

Parameters

name
Type: de.softpro.signdocsdk.Enums.ESignatureParametersIntegerParameter
The name of the parameter (case-sensitive).
value
Type: SystemInt32
The value of the parameter.
Remarks
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 @a 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.
  • BiometricHashLocation - Specifies where to store the message digest computed over the document hash and the unencrypted biometric data (#bhl_attr or #bhl_contents). This parameter is used for PDF documents only. The default value is #bhl_attr.
  • CertificateSigningAlgorithm - The signing algorithm for the self-signed certificate (#csa_sha1_rsa or #csa_md5_rsa). certificate (#csa_sha1_rsa, #csa_md5_rsa, #csa_sha256_rsa, #csa_sha384_rsa, #csa_sha512_rsa, or #csa_ripemd160_rsa).
  • DetachedHashAlgorithm - HHash 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_sha224, #dha_sha256, #dha_sha384, #dha_sha512, or #dha_ripemd160. The default value is #dha_default. See also integer parameters "Method" and "IgnoreSeedValues".
  • DocMDP - To create a certification signature rather than an approval signature, set this parameter to a positive value(PDF only) : -1 no changes to the document shall be permitted -2 only filling in forms, instantiating page templates, and signing shall be permitted -3 only filling in forms, instantiating page templates, signing, creating annotations, deleting annotations, and modifying annotations shall be permitted. . To create an approval signature, set this parameter to 0 or -1. The default value is - 1. A positive MDP value from the signature seed value dictionary overrides this parameter, see SignDocField.getSeedValueMDP(). A PDF document can have at most one certification signature.
  • GenerateKeyPair - Start generation of an RSA 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". See also string parameter "GenerateECCKeyPair". "GenerateECCKeyPair" and "GenerateKeyPair" are mutually exclusive.
  • 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, or #ha_right). 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
    See also blob parameter "Template".
  • 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
    See also blob parameter "Template".
  • 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. See also blob parameter "Template".
  • 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 parameters "OutputPath" and "TemporaryDirectory". 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 break existing signatures.
  • 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).
  • RemoveXFA - This parameter controls whether the XFA entry of the interactive form dictionary of the PDF document shall be removed.SignDoc SDK does not support XFA(XML Forms Architecture) and therefore addSignature(), addField(), applyFdf(), and setField() remove XFA from the document to avoid descrepancies between "classic" form fields and XFA. Use one of these values : #rx_always, #rx_if_possible, #rx_never. The default value is #rx_if_allowed. This parameter is ignored for TIFF documents.
  • 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. SignWare is required for rendering signatures. 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". This parameter is not yet implemented for Linux, iOS, Android, OS X, and Windows Store apps. See also string parameters "SelectCertificateMessage" and "SelectCertificateTitle".
  • 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.
  • 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 under Linux, iOS, and Android.
  • TextHAlignment - The horizontal alignment of text lines (#ha_left, #ha_center, #ha_right, #ha_justify, or #ha_auto). 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
    See also blob parameter "Template".
  • 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
    See also blob parameter "Template".
  • 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
    See also blob parameter "Template".
  • 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".
See Also