Click or drag to resize
SignDocSignatureParameterssetString Method
Set a string 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 setString(
	StringParameter name,
	string value
)

Parameters

name
Type: de.softpro.signdocsdk.Enums.ESignatureParametersStringParameter
The name of the parameter (case-sensitive).
value
Type: SystemString
The value of the parameter.
Remarks
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 @ref signdocshared_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 @ref signdocshared_biometric_encryption.
  • 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 '\n'. The default value is empty. Complex scripts are supported, see @ref signdocshared_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 @ref signdocshared_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", color parameter "TextColor", and blob parameter "Template".
  • GenerateECCKeyPair - Start generation of an elliptic curve key pair for the self - signed certificate.The value is the name or the object identifier of the curve, e.g., prime256v1. 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 integer parameter "GenerateKeyPair". "GenerateECCKeyPair" and "GenerateKeyPair" are mutually exclusive.
  • 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 @ref signdocshared_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 - Some signing methods need to write to a file. This parameter contains the output pathname. If this parameter is non-empty, string parameter "TemporaryDirectory" will be ignored. See also integer parameter "Optimize". Currently, using this parameter for the second or subsequent signature of a PDF document will break existing signatures. 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 @ref signdocshared_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 @ref signdocshared_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".
  • TemporaryDirectory - Some signing methods need to write to a file. This parameter specifies the directory to be used for temporary files. If empty (default), the system default will be used. If "OutputPath" is set, "TemporaryDirectory" will be ignored. See also integer parameter "Optimize".
  • 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 '\n'. The default value is empty. Complex scripts are supported, see @ref signdocshared_complex_scripts. See also blob parameter "Template".
  • 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 the value is "-", the M entry will be omitted (this is only allowed if the PKCS #7 message contains a signingTime or timeStampToken attribute; note that the signingTime attribute is not allowed for method #m_digsig_cades_detached). 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", "TimeStampClientKeyPath", 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.
See Also