Signatures |
Start page Previous page Next page |
Digital signing of PDF documents
By means of the interface to webPDF, n2pdf makes it possible to digitally sign PDF documents (electronic signatures) by applying a signature using a digital certificate. The authenticity (identity of the signatory) of PDF documents can thereby be confirmed and the PDF documents can be protected against alterations and manipulation.
In the context of the creation of your PDF documents, you can now sign them with finality by means of a digital certificate. webPDF applies a certificate to this effect to the document for this purpose. You may specify the different settings, such as the visibility or the position of the certificate.
Of course, webPDF also supports the application of time stamps in the digital certificates. This makes it possible for you to digitally certify and secure the point in time of signing.
Documents can be signed in compliance with legal requirements by using a corresponding classification (e.g. a “qualified electronic signature” or “advanced electronic signature”). You can use this web service in connection with e-invoices (electronic invoices) or archiving systems (revision-proof archiving), for example.
webPDF makes it possible to use certificates provided by a "Certificate Authority" (CA) or "self-signed" certificates. Certificates complying with the X.509 standard are used.
The following settings allow you to control the use of the signature service from within n2pdf.All options are set via the function N2PDFSetOption. You can choose from the following function parameters:
N2PDFOPTION_SIGNATURE_ENABLED Enables the signature service. All of the following options only take effect after this option has been enabled.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_ENABLED, N2PDFVALUE_True, "" )
N2PDFOPTION_SIGNATURE_KEYSTORE_NAME Defines the name of the key (alias) that is to be used to sign the document. This option overwrites the server's configuration setting.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_KEYSTORE_NAME, "default", "" )
N2PDFOPTION_SIGNATURE_KEYSTORE_PASSWORD Defines the password that is required to access the private key which was set using the option N2PDFOPTION_SIGNATURE_KEYSTORE_NAME. This option overwrites the server's configuration setting.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_KEYSTORE_PASSWORD, "n2pdf", "" )
N2PDFOPTION_SIGNATURE_REASON Specifies the reason why the document is being signed.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_REASON, doc.Reason(0), "" )
N2PDFOPTION_SIGNATURE_LOCATION Specifies the location of the signature.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_LOCATION, doc.Location(0), "" )
N2PDFOPTION_SIGNATURE_CONTACT Specifies the name of the person signing the document.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_CONTACT, doc.Contact(0), "" )
N2PDFOPTION_SIGNATURE_CERT_LEVEL (Default: 1) This parameter defines the level of the signature.
Example: The signed document has been certified; it is possible to fill in fields. Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_CERT_LEVEL, "2", "" )
N2PDFOPTION_SIGNATURE_PAGE (Default: 1) Defines the page on which the signature is to be displayed.
Example: The signature is located on the first page. Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_PAGE, "1", "" )
N2PDFOPTION_SIGNATURE_VISIBLE (Default: N2PDFVALUE_FALSE) Use this option to specify whether the signature should be displayed visually in the document or saved invisibly in the document.
Example: The signature is displayed visibly in the document. Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_VISIBLE, N2PDFVALUE_True, "" )
N2PDFOPTION_SIGNATURE_FIELD Defines the name of the field (in the document) in which the signature will be saved. If a field name that is not unique is declared, then a unique name will be automatically created.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_FIELD, "security", "" )
N2PDFOPTION_SIGNATURE_IDENTIFIER Specifies the application that has created the digital signature. This information is displayed when the signature is displayed visibly in the document. In this case, the value is shown in the visual element.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_IDENTIFIER, "Lotus Notes", "" )
N2PDFOPTION_SIGNATURE_APPEND Use this option to specify whether the new signature should be appended if there is already a signature in the document.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_APPEND, N2PDFVALUE_True, "" )
N2PDFOPTION_SIGNATURE_POSITION_X (default: 10 millimetres from the left margin) With this option you can specify the X-position of the field
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_POSITION_X, "15", "" )
N2PDFOPTION_SIGNATURE_POSITION_Y (default: 10 millimetres from the bottom margin) With this option you can specify the Y-position of the field
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_POSITION_Y, "15", "" )
N2PDFOPTION_SIGNATURE_POSITION_WIDTH (default: 80 - in millimetres) With this option you can specify the width of the signature field
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_POSITION_WIDTH, "150", "" )
N2PDFOPTION_SIGNATURE_POSITION_HEIGHT (default: 40 - in millimetres) With this option you can specify the height of the signature field.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_POSITION_HEIGHT, "100", "" )
N2PDFOPTION_SIGNATURE_POSITION_UNIT(Default: "mm") Unit for the X-axis/Y-axis position and signature field height and width arguments.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_POSITION_UNIT, N2PDFVALUE_SIGNATURE_POSITION_UNIT_PX , "" )
The following values can be set for the appearance
N2PDFOPTION_SIGNATURE_IMAGE_FILENAME Use this option to specify the file name to be displayed in the signature as an image in the signature field.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_IMAGE_FILENAME, "c:\temp\signature.jpg"100", "" )
N2PDFOPTION_SIGNATURE_IMAGE_OPACITY(Default: 50) Opacity of image as a percentage value between 0 and 100.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_IMAGE_OPACITY, "100", "" )
N2PDFOPTION_SIGNATURE_IMAGE_POSITION(Default: "center") Position of image within signature field:
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_IMAGE_POSITION, "left", "" )
The following options can be used to show and hide the certificate’s name parts. Setting a value to "true" will show the corresponding part, while "false" will hide it.
The default value for the following options is ‘N2PDFVALUE_TRUE’ N2PDFOPTION_SIGNATURE_ID_SIGNED_BY N2PDFOPTION_SIGNATURE_ID_NAME N2PDFOPTION_SIGNATURE_ID_COMMON_NAME N2PDFOPTION_SIGNATURE_ID_ORG_UNIT N2PDFOPTION_SIGNATURE_ID_ORG_NAME N2PDFOPTION_SIGNATURE_ID_LOCAL N2PDFOPTION_SIGNATURE_ID_STATE N2PDFOPTION_SIGNATURE_ID_COUNTRY N2PDFOPTION_SIGNATURE_ID_MAIL N2PDFOPTION_SIGNATURE_ID_DATE
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_SIGNATURE_ID_SIGNED_BY, N2PDFVALUE_FALSE, "" )
|