SignDoc SDK (C)  5.0.0
SIGNDOC_SignatureParameters Class Reference

Parameters for signing a document. More...

#include <SignDocSDK-c.h>

Public Member Functions

void SIGNDOC_SignatureParameters_delete (struct SIGNDOC_SignatureParameters *aObj)
 SIGNDOC_SignatureParameters destructor. More...
 
int SIGNDOC_SignatureParameters_setString (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, int aEncoding, const char *aName, const char *aValue)
 Set a string parameter. More...
 
int SIGNDOC_SignatureParameters_setStringW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, const char *aName, const wchar_t *aValue)
 Set a string parameter. More...
 
int SIGNDOC_SignatureParameters_setInteger (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, const char *aName, int aValue)
 Set an integer parameter. More...
 
int SIGNDOC_SignatureParameters_setBlob (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, const char *aName, const unsigned char *aData, size_t aSize)
 Set a blob parameter. More...
 
int SIGNDOC_SignatureParameters_setLength (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, const char *aName, int aType, double aValue)
 Set a length parameter. More...
 
int SIGNDOC_SignatureParameters_setColor (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, const char *aName, const struct SIGNDOC_Color *aValue)
 Set a color parameter. More...
 
int SIGNDOC_SignatureParameters_addTextItem (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, const char *aItem, int aGroup)
 Add another string to be displayed, top down. More...
 
int SIGNDOC_SignatureParameters_addTextItem2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, const char *aItem, int aGroup, int aHAlignment, int aDirection)
 Add another string to be displayed, top down, with paragraph direction. More...
 
int SIGNDOC_SignatureParameters_clearTextItems (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj)
 Remove all strings that were to be displayed. More...
 
int SIGNDOC_SignatureParameters_setTextItemDirection (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, const char *aItem, int aHAlignment, int aDirection)
 Set the paragraph direction of text items. More...
 
int SIGNDOC_SignatureParameters_setPKCS7 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, struct SIGNDOC_SignPKCS7 *aPKCS7)
 Set an object which will create a PKCS #7 or CAdES signature. More...
 
int SIGNDOC_SignatureParameters_setRSA (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, struct SIGNDOC_SignRSA *aRSA)
 Set an object which will create an RSA signature. More...
 
int SIGNDOC_SignatureParameters_setECDSA (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, struct SIGNDOC_SignECDSA *aECDSA)
 Set an object which will create an ECDSA signature. More...
 
int SIGNDOC_SignatureParameters_getAvailableMethods (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj)
 Get a bitset indicating which signing methods are available for this signature field. More...
 
int SIGNDOC_SignatureParameters_getTemplate (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, struct SIGNDOC_ByteArray *aOutput)
 Get an XML document specifying the current layout. More...
 
const char * SIGNDOC_SignatureParameters_getErrorMessage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_SignatureParameters *aObj, int aEncoding)
 Get an error message for the last function call. More...
 
const wchar_t * SIGNDOC_SignatureParameters_getErrorMessageW (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_SignatureParameters *aObj)
 Get an error message for the last function call. More...
 
int SIGNDOC_SignatureParameters_getType (struct SIGNDOC_Exception **aEx, const char *aName)
 Get the type of a parameter. More...
 

Detailed Description

Parameters for signing a document.

Use SIGNDOC_Document_createSignatureParameters(), SIGNDOC_Document_createSignatureParametersForTimeStamp(), or SIGNDOC_Document_createSignatureParametersW() to create objects of this type.

Use SIGNDOC_SignatureParameters_getErrorMessage() or SIGNDOC_SignatureParameters_getErrorMessageW() to get more information after a function call failed.

The available parameters depend both on the document type and on the signature field for which the SIGNDOC_SignatureParameters object has been created.

SIGNDOC_Document_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 SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_SOFTWARE and SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_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), SIGNDOC_Document_addSignature() will fail with SIGNDOC_RETURNCODE_NO_CERTIFICATE. If more than one matching certificate is available but SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_NEVER_ASK is specified in integer parameter "SelectCertificate"), SIGNDOC_Document_addSignature() will fail with SIGNDOC_RETURNCODE_AMBIGUOUS_CERTIFICATE.

To make the signature maximally meaningful, integer parameter "AddCertificates" should be SIGNDOC_SIGNATUREPARAMETERS_ADDCERTIFICATES_ALL (which is the default value) and integer parameter "AddRevocationInfo" should include SIGNDOC_SIGNATUREPARAMETERS_ADDREVOCATIONINFO_ADD.

Unless you need a specific signing method, you should leave integer parameter "Method" at its default value SIGNDOC_SIGNATUREPARAMETERS_METHOD_DEFAULT. If you select a specific signing method and that method is not allowed by the signature field's seed values, signing will fail.

Unless you need a specific digest algorithm, you should leave string parameter "DetachedHashAlgorithm" at its default value. 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:
(1b)
Default method, the certificate and its key are provided as PKCS #12 blob:
(1c)
Default method, private key provided, certificate provided:
(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:
(1g)
Default method via SIGNDOC_SignRSA or SIGNDOC_SignECDSA interface: See SIGNDOC_SignatureParameters_setRSA() and SIGNDOC_SignatureParameters_setECDSA() for details.
(1h)
Default method, private key provided, self-signed certificate created on the fly:
(1i)
Default method, user may select certificate or choose to create a self-signed certificate, the private key of which is provided:
(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 SIGNDOC_SignRSA or SIGNDOC_SignECDSA interface: See SIGNDOC_SignatureParameters_setRSA() and SIGNDOC_SignatureParameters_setECDSA() 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 SIGNDOC_SignPKCS7 interface: See SIGNDOC_SignatureParameters_setPKCS7() for details.
(3a)
PKCS #1, private key and self-signed certificate created on the fly:
(3b)
PKCS #1 via SIGNDOC_SignRSA interface or SIGNDOC_SignECDSA: See SIGNDOC_SignatureParameters_setRSA() or SIGNDOC_SignatureParameters_setECDSA() for details.
(3c)
PKCS #1, private key provided, self-signed certificate created on the fly:
(3d)
PKCS #1, private key provided, self-signed certificate provided:
(4a)
document time stamp using a SIGNDOC_SignatureParameters object created by SIGNDOC_Document_createSignatureParametersForTimeStamp():
  • TimeStampServerURL: URL of time stamp server

Additionally:

  • You may want to set string parameter "Filter" to "Adobe.PPKLite".
  • You may want to set integer parameter "IgnoreSeedValues" if you set integer parameter "Method" and/or string parameter "DetachedHashAlgorithm".

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

(4)
just a hash:

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

  • DetachedHashAlgorithm (string)
  • IgnoreSeedValues (integer)
  • Method (integer)
  • RSASignatureScheme (string)

The following parameters control the private key used for signing:

  • Certificate (blob)
  • CertificatePrivateKey (blob)
  • GenerateECCKeyPair (string)
  • GenerateKeyPair (integer)
  • PKCS#12Password (string)

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

  • BiometricData (blob)
  • PenWidth (integer)
  • RenderSignature (integer)
  • RenderWidth (integer)
  • SignatureColor (color)

The following parameters put additional data into the signature:

  • ContactInfo (string)
  • Filter (string)
  • Location (string)
  • Reason (string)
  • Signer (string)
  • Timestamp (string)

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

  • Adviser (string)
  • Comment (string)
  • ContactInfo (string)
  • Location (string)
  • Reason (string)
  • Signer (string)
  • SignTime (string)
  • Template (blob)
  • Text1 through Text9 (string)

The following parameters control how a signed signature field in a PDF document will look like (parameters marked with * can be overridden with blob parameter "Template"):

  • FontName (string) *
  • FontSize (length) *
  • Image (blob)
  • ImageDPI (integer)
  • ImageHAlignment (integer) *
  • ImageMargin (length) *
  • ImageTransparency (integer) *
  • ImageVAlignment (integer) *
  • SignatureColor (color)
  • Template (blob)
  • TextColor (color) *
  • TextHAlignment (integer) *
  • TextHMargin (length) *
  • TextPosition (integer) *
  • TextVAlignment (integer) *

The following parameters control the signing certificate:

  • Certificate (blob)
  • PKCS#12Password (string)

The following parameters are used for generating a self-signed certificate on the fly (you also need to set at least one parameter for the private key):

  • CertificateSigningAlgorithm (string)
  • CommonName (string)
  • Country (string)
  • Locality (string)
  • Organization (string)
  • OrganizationUnit (string)

The following parameters are used for putting biometric data (handwritten signature) into the signature:

  • BiometricData (blob)
  • BiometricEncryption (integer)
  • BiometricHashLocation (integer)
  • BiometricKey (blob)
  • BiometricKeyPath (string)
  • BiometricPassphrase (string)

The following parameters control the certificate selection dialog:

  • FilterCertificatesByIssuerCertificate (blob)
  • FilterCertificatesByPolicy (string)
  • FilterCertificatesBySubjectCertificate (blob)
  • FilterCertificatesBySubjectDN (string)
  • SelectCertificate (integer)
  • SelectCertificateMessage (string)
  • SelectCertificateTitle (string)

The following parameters control RFC 3161 timestamps:

  • TimeStampClientCertificatePath (string)
  • TimeStampClientKeyPath (string)
  • TimeStampHashAlgorithm (string)
  • TimeStampRetries (integer)
  • TimeStampServerPassword (string)
  • TimeStampServerTimeout (integer)
  • TimeStampServerURL (string)
  • TimeStampServerUser (string)
  • TimeStampSize (integer)
  • TimeStampUserAgent (string)

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

  • AddCertificates (integer)
  • AddRevocationInfo (integer)
  • IntermediateCertificate (blob)

The following parameters do not fall into the above categories:

  • OutputPath (string)
  • Optimize (integer)
  • PDFAButtons (integer)
  • RemoveXFA (integer)

Member Function Documentation

int SIGNDOC_SignatureParameters_addTextItem ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
const char *  aItem,
int  aGroup 
)

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 SIGNDOC_Document_createSignatureParameters() or SIGNDOC_Document_createSignatureParametersW():

ProfileValue
"" "Signer"/SIGNDOC_SIGNATUREPARAMETERS_TEXTGROUP_MASTER, "SignTime"/SIGNDOC_SIGNATUREPARAMETERS_TEXTGROUP_MASTER
"image"(empty)

The paragraph direction is 0 which is treated like SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_LTR.

See also blob parameter "Template".

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aItemSelect the string to be added:
  • Signer String parameter "Signer".
  • SignTime String parameter "SignTime".
  • Comment String parameter "Comment".
  • Adviser String parameter "Adviser".
  • ContactInfo String parameter "ContactInfo".
  • Location String parameter "Location".
  • Reason String parameter "Reason".
  • Text1 String parameter "Text1".
  • Text2 String parameter "Text2".
  • Text3 String parameter "Text3".
  • Text4 String parameter "Text4".
  • Text5 String parameter "Text5".
  • Text6 String parameter "Text6".
  • Text7 String parameter "Text7".
  • Text8 String parameter "Text8".
  • Text9 String parameter "Text9".
[in]aGroupThe string's group for font size computation: SIGNDOC_SIGNATUREPARAMETERS_TEXTGROUP_MASTER or SIGNDOC_SIGNATUREPARAMETERS_TEXTGROUP_SLAVE.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_addTextItem2(), SIGNDOC_SignatureParameters_clearTextItems(), SIGNDOC_SignatureParameters_setTextItemDirection()
int SIGNDOC_SignatureParameters_addTextItem2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
const char *  aItem,
int  aGroup,
int  aHAlignment,
int  aDirection 
)

Add another string to be displayed, top down, with paragraph direction.

For DigSig signature fields, this function adds another string to the appearance stream of PDF documents. The first call clears any default strings. The default values depend on the profile passed to SIGNDOC_Document_createSignatureParameters() or SIGNDOC_Document_createSignatureParametersW():

ProfileValue
"" "Signer"/SIGNDOC_SIGNATUREPARAMETERS_TEXTGROUP_MASTER, "SignTime"/SIGNDOC_SIGNATUREPARAMETERS_TEXTGROUP_MASTER
"image"(empty)

See also blob parameter "Template".

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aItemSelect the string to be added:
  • Signer String parameter "Signer".
  • SignTime String parameter "SignTime".
  • Comment String parameter "Comment".
  • Adviser String parameter "Adviser".
  • ContactInfo String parameter "ContactInfo".
  • Location String parameter "Location".
  • Reason String parameter "Reason".
  • Text1 String parameter "Text1".
  • Text2 String parameter "Text2".
  • Text3 String parameter "Text3".
  • Text4 String parameter "Text4".
  • Text5 String parameter "Text5".
  • Text6 String parameter "Text6".
  • Text7 String parameter "Text7".
  • Text8 String parameter "Text8".
  • Text9 String parameter "Text9".
[in]aGroupThe string's group for font size computation: SIGNDOC_SIGNATUREPARAMETERS_TEXTGROUP_MASTER or SIGNDOC_SIGNATUREPARAMETERS_TEXTGROUP_SLAVE.
[in]aHAlignmentHorizontal alignment. This value overrides integer parameter "TextHAlignment" unless it is SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_DEFAULT. Other possible values are SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_LEFT, SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_CENTER, SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_RIGHT, SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_JUSTIFY, and SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_AUTO.
[in]aDirectionThe paragraph direction: 0, SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_LTR, SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_RTL, SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_DEFAULT_LTR, or SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_DEFAULT_RTL. 0 is treated like SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_LTR.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_addTextItem(), SIGNDOC_SignatureParameters_clearTextItems()
int SIGNDOC_SignatureParameters_clearTextItems ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj 
)

Remove all strings that were to be displayed.

SIGNDOC_SignatureParameters_addTextItem() cannot remove the default strings without adding a new string. This function does.

See also blob parameter "Template".

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_addTextItem()
void SIGNDOC_SignatureParameters_delete ( struct SIGNDOC_SignatureParameters aObj)

SIGNDOC_SignatureParameters destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
int SIGNDOC_SignatureParameters_getAvailableMethods ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj 
)

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

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
Returns
1<<SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_PKCS1 etc.
See also
SIGNDOC_Document_getAvailableMethods()
const char * SIGNDOC_SignatureParameters_getErrorMessage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
int  aEncoding 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aEncodingThe encoding to be used for the error message (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_SignatureParameters_getErrorMessageW()
const wchar_t * SIGNDOC_SignatureParameters_getErrorMessageW ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_SignatureParameters aObj 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_SignatureParameters_getErrorMessage()
int SIGNDOC_SignatureParameters_getTemplate ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
struct SIGNDOC_ByteArray aOutput 
)

Get an XML document specifying the current layout.

This function can be used for debugging and for reporting bugs. This function will fail if the "Template" blob parameter is invalid.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in,out]aOutputThe XML document will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_setBlob()
int SIGNDOC_SignatureParameters_getType ( struct SIGNDOC_Exception **  aEx,
const char *  aName 
)

Get the type of a parameter.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aNameThe name of the parameter (case-sensitive).
Returns
The type of the parameter: SIGNDOC_SIGNATUREPARAMETERS_TYPE_UNDEFINED, SIGNDOC_SIGNATUREPARAMETERS_TYPE_INTEGER, SIGNDOC_SIGNATUREPARAMETERS_TYPE_STRING, SIGNDOC_SIGNATUREPARAMETERS_TYPE_COLOR, SIGNDOC_SIGNATUREPARAMETERS_TYPE_BLOB, or SIGNDOC_SIGNATUREPARAMETERS_TYPE_LENGTH.
int SIGNDOC_SignatureParameters_setBlob ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
const char *  aName,
const unsigned char *  aData,
size_t  aSize 
)

Set a blob parameter.

Available blob parameters are:

  • BiometricData 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"). If used for rendering, the data must be in a format supported by SignWare (e.g., created by SPFlatFileCreateFromSignature()).
  • BiometricKey The public key (SIGNDOC_SIGNATUREPARAMETERS_BIOMETRICENCRYPTION_RSA) or the AES key (SIGNDOC_SIGNATUREPARAMETERS_BIOMETRICENCRYPTION_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) for RSA or in SEC 1 format, traditional format, or PKCS #8 format (DER or PEM) for ECDSA. 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" or with string parameter "GenerateECCKeyPair".
  • FilterCertificatesByIssuerCertificate Acceptable issuer certificates. Setting this parameter adds the specified DER-encoded certificate to a list of acceptable issuer certificates. Pass 0 for aSize 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. SIGNDOC_Document_addSignature() will fail if no matching certificate is available for signing. Note that SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_SOFTWARE and/or SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_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 0 for aSize to clear the list. A PDF document may contain (in its certificate seed value dictionaries) additional restrictions for acceptable certificates. SIGNDOC_Document_addSignature() will fail if no matching certificate is available for signing. Note that SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_SOFTWARE and/or SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_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 parameters "ImageDPI", "ImageTransparency", and blob parameter "Template".
  • 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. SIGNDOC_SignatureParameters_setBlob() calls with name "IntermediateCertificate" are cumulative. Intermediate certificates can also be provided in the PKCS #12 blob passed to blob parameter "Certificate". See also integer parameter "AddCertificates".
  • Template An XML document specifying the layout of the appearance of a signature in PDF documents. The XML document must conform to SignatureTemplate.dtd, which see for details. You can control the layout of the appearance of the signature by
    • using the default values provided by SIGNDOC_Document_createSignatureParameters(), or
    • using only string parameters (such as "FontName"), integer parameters (such as "TextPosition"), length parameters (such as "ImageMargin"), and color parameters (such as "TextColor"), or
    • using only blob parameter "Template", or
    • a mixture of the above.
    Initial values for the parameters are provided by SIGNDOC_Document_createSignatureParameters(). If blob parameter "Template" is set, text items added by SIGNDOC_SignatureParameters_addTextItem() and friends are ignored, but other parameters provide default values for attributes not used in the XML document.

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

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aDataA pointer to the first octet of the value.
[in]aSizeSize of the blob (number of octets).
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_getTemplate()
int SIGNDOC_SignatureParameters_setColor ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
const char *  aName,
const struct SIGNDOC_Color aValue 
)

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", length parameter "FontSize", and blob parameter "Template".
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter (will be copied).
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_SignatureParameters_setECDSA ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
struct SIGNDOC_SignECDSA aECDSA 
)

Set an object which will create an ECDSA signature.

By default, ECDSA signatures are computed internally which means that the private key must be available on this machine.

Requirements for string parameters:

  • GenerateECCKeyPair must not be set

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

SIGNDOC_SignatureParameters_setRSA() and SIGNDOC_SignatureParameters_setPKCS7() must not have been called.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aECDSAThe object that will compute the ECDSA signature. This function does not take ownership of that object. It must still be alive when SIGNDOC_Document_addSignature() is called.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_setPKCS7(), SIGNDOC_SignatureParameters_setRSA()
int SIGNDOC_SignatureParameters_setInteger ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
const char *  aName,
int  aValue 
)

Set an integer parameter.

Available integer parameters are:

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_SignatureParameters_setLength ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
const char *  aName,
int  aType,
double  aValue 
)

Set a length parameter.

Available length parameters are:

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aTypeDefine how the length is specified: SIGNDOC_SIGNATUREPARAMETERS_VALUETYPE_ABS, SIGNDOC_SIGNATUREPARAMETERS_VALUETYPE_FIELD_HEIGHT, or SIGNDOC_SIGNATUREPARAMETERS_VALUETYPE_FIELD_WIDTH.
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_SignatureParameters_setPKCS7 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
struct SIGNDOC_SignPKCS7 aPKCS7 
)

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
  • GenerateECCKeyPair 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

SIGNDOC_SignatureParameters_setRSA() and SIGNDOC_SignatureParameters_setECDSA() must not have been called.

The SIGNDOC_SignPKCS7 interface is quite hard to use, please use SIGNDOC_SignatureParameters_setRSA() and the SIGNDOC_SignRSA interface or SIGNDOC_SignatureParameters_setECDSA() and the SIGNDOC_SignECDSA interface instead.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aPKCS7The object that will create the PKCS #7 or CAdES signature. This function does not take ownership of that object. It must still be alive when SIGNDOC_Document_addSignature() is called.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_setECDSA(), SIGNDOC_SignatureParameters_setRSA()
int SIGNDOC_SignatureParameters_setRSA ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
struct SIGNDOC_SignRSA aRSA 
)

Set an object which will create an RSA signature.

By default, RSA signatures are computed internally which means that the private key must be available on this machine.

Requirements for string parameters:

  • GenerateECCKeyPair must not be set

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

SIGNDOC_SignatureParameters_setECDSA() and SIGNDOC_SignatureParameters_setPKCS7() must not have been called.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aRSAThe object that will compute the RSA signature. This function does not take ownership of that object. It must still be alive when SIGNDOC_Document_addSignature() is called.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_setECDSA(), SIGNDOC_SignatureParameters_setPKCS7()
int SIGNDOC_SignatureParameters_setString ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
int  aEncoding,
const char *  aName,
const char *  aValue 
)

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. 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 SIGNDOC_SIGNATUREPARAMETERS_BIOMETRICENCRYPTION_RSA. See also blob parameter "BiometricKey" and Encryption of biometric data. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
  • BiometricPassphrase Passphrase to be used if integer parameter "BiometricEncryption" is SIGNDOC_SIGNATUREPARAMETERS_BIOMETRICENCRYPTION_PASSPHRASE. Should contain ASCII characters only.
  • CertificateSigningAlgorithm The signing algorithm for the self-signed certificate:
    • "ECDSA-SHA-1"
    • "ECDSA-SHA-224"
    • "ECDSA-SHA-256"
    • "ECDSA-SHA-384"
    • "ECDSA-SHA-512"
    • "RSA-MD5"
    • "RSA-RIPEMD-160"
    • "RSA-SHA-1"
    • "RSA-SHA-256"
    • "RSA-SHA-384"
    • "RSA-SHA-512"
    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.
  • Comment The comment. For DigSig signature fields, the comment may be used for the appearance stream of PDF documents. 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. 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.
  • DetachedHashAlgorithm Hash algorithm to be used for a detached signature (ie, if integer parameter "Method" is SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_PKCS7_DETACHED or SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_CADES_DETACHED). The following values are supported:
    • "default": default hash algorithm. For RSA, use the hash algorithm specified by the DigestMethod values of the signature field seed value dictionary or, if not present, SHA-256 (if supported), or SHA-1 (as last resort). For ECDSA, use the hash algorithm recommended for the elliptic curve used by the signing certificate's key.
    • "RIPEMD-160". Not supported under Windows.
    • "SHA-1". Deprecated, but supported everywhere.
    • "SHA-224". Supported for ECDSA signatures only.
    • "SHA-256". If SHA-256 is selected but not supported, SIGNDOC_Document_addSignature() will fall back to SHA-1.
    • "SHA-384". If SHA-384 is selected but not supported, SIGNDOC_Document_addSignature() will fall back to SHA-1.
    • "SHA-512". If SHA-384 is selected but not supported, SIGNDOC_Document_addSignature() will fall back to SHA-1.
    The default value is "default". See also integer parameters "Method" and "IgnoreSeedValues".
  • 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. SIGNDOC_Document_addSignature() will fail if no matching certificate is available for signing. Note that SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_SOFTWARE and/or SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_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. SIGNDOC_Document_addSignature() will fail if no matching certificate is available for signing. Note that SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_SOFTWARE and/or SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_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 conformance). 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. 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 non-empty, the file backing the document, if any, won't be modified. 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). The default value is empty. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
  • 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. The default value is empty. Complex scripts are supported, see Complex Scripts.
  • RSASignatureScheme The RSA signature scheme to be used for PKCS #7 signatures with RSA keys:
    • "PKCS1": PKCS #1 (RSA v1.5). This signature scheme should be supported by all software that verifies DigSig signatures in PDF documents. However, it is considered obsolete due to security concerns.
    • "PSS": Probabilistic Signature Scheme (PSS) (RSA v2.0 and v2.1). Improved signature scheme, supposed to be more secure than PKCS #1 However, this signature scheme may not be supported by all software that verifies DigSig signatures in PDF documents. For instance, Adobe Acrobat DC supports RSA-PSS since April 2017 (Windows) and August 2017 (MacOS). When using a certificate from a Windows certificate store (see integer parameter "SelectCertificate"), the private key must be provided by a CNG Key Storage Provider.
    The default value is "PKCS1".
  • 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. 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. 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. The text can contain multiple lines which are separated by '
    '. The default value is empty. Complex scripts are supported, see Complex Scripts. See also blob parameter "Template".
  • Text2 See Text1.
  • Text3 See Text1.
  • Text4 See Text1.
  • Text5 See Text1.
  • Text6 See Text1.
  • Text7 See Text1.
  • Text8 See Text1.
  • Text9 See Text1.
  • 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 SIGNDOC_SIGNATUREPARAMETERS_METHOD_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". See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
  • 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". See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
  • TimeStampHashAlgorithm Hash algorithm for RFC 3161 time stamps:
    • "default": use a default value. For signatures, use the same hash algorithm as used for the document hash. For document time stamps, SHA-256 (if supported by the time stamp server) SHA-1 (if SHA-256 is not supported by the time stamp server) will be used. 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 "default" for string parameter "DetachedHashAlgorithm"). SHA-256 will be used if the document hash is SHA-224. SHA-256 will be used if string parameter "DetachedHashAlgorithm" is "default" and the document hash is SHA-384 or SHA-512 (this can happen for keys using certain elliptic curves).
    • "SHA-1"
    • "SHA-256"
    • "SHA-384"
    • "SHA-512"
    The default value is "default". See also string parameter "TimeStampServerURL".
  • 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 SIGNDOC_Document_addSignature() if a time-stamp server is to be used and integer parameter "Method" is not SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_PKCS7_DETACHED, SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_PKCS7_SHA1, or SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_CADES_DETACHED. See also integer parameters "TimeStampRetries", "TimeStampServerTimeout", and "TimeStampSize", and string parameters "TimeStampClientCertificatePath", "TimeStampClientKeyPath", "TimeStampHashAlgorithm", "TimeStampServerPassword", "TimeStampServerUser", and "TimeStampUserAgent". See also SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFile(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFileW(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromMemory(), and SIGNDOC_DocumentLoader_loadTrustedCertificatesFromStream().
  • 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_Build", and any name starting with "Prop_BiometricData", see SIGNDOC_VerificationResult_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
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aEncodingThe encoding used for aValue (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter. The encoding is specified by aEncoding.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_SignatureParameters_setStringW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
const char *  aName,
const wchar_t *  aValue 
)

Set a string parameter.

See SIGNDOC_SignatureParameters_setString() for a list of available string parameters.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_SignatureParameters_setTextItemDirection ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_SignatureParameters aObj,
const char *  aItem,
int  aHAlignment,
int  aDirection 
)

Set the paragraph direction of text items.

This function sets the paragraph direction of all existing text items matching aItem.

See also blob parameter "Template".

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_SignatureParameters object.
[in]aItemSelect the text items:
  • Signer String parameter "Signer".
  • SignTime String parameter "SignTime".
  • Comment String parameter "Comment".
  • Adviser String parameter "Adviser".
  • ContactInfo String parameter "ContactInfo".
  • Location String parameter "Location".
  • Reason String parameter "Reason".
  • Text1 String parameter "Text1".
  • Text2 String parameter "Text2".
  • Text3 String parameter "Text3".
  • Text4 String parameter "Text4".
  • Text5 String parameter "Text5".
  • Text6 String parameter "Text6".
  • Text7 String parameter "Text7".
  • Text8 String parameter "Text8".
  • Text9 String parameter "Text9".
[in]aHAlignmentHorizontal alignment. This value overrides integer parameter "TextHAlignment" unless it is SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_DEFAULT. Other possible values are SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_LEFT, SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_CENTER, SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_RIGHT, SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_JUSTIFY, and SIGNDOC_SIGNATUREPARAMETERS_HALIGNMENT_AUTO.
[in]aDirectionThe paragraph direction: 0, SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_LTR, SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_RTL, SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_DEFAULT_LTR, or SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_DEFAULT_RTL. 0 is treated like SIGNDOC_SIGNATUREPARAMETERS_TEXTITEMDIRECTION_LTR.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_SignatureParameters_addTextItem(), SIGNDOC_SignatureParameters_addTextItem2()

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