Integrator for Notes
DocsSupport RequestWebsite
  • Integrator for Notes
  • Introduction (Slideshows)
  • Installation
    • Language translation support
    • ActiveX settings in IE
    • Release History
  • How to
    • How to apply multilingual support
    • How to avoid the appearance of the prompt when leaving the page
    • How to attach more than 10 files to a Notes document
    • How to create Template database
    • How to install SWING Integrator ActiveX controls using the Active Directory (MSI package)
    • How to map fields from parent/other document
    • How to open existing document without prompt
    • How to place a watermark in a PDF document
    • How to rename attachments
    • How to sign PDF document
    • How to transfer Lotus Notes data to a MS Word header or footer
    • [Deprecated] - Avoid the appearance of the prompt when leaving the page
  • Error messages
    • "SwDocumentLib - SW_OpenMSWord 55-9999" message
    • "[40] - Unauthorized user. Please contact your database manager" message
    • "SwOpenOfficeLib - Sw_GetCurrentOODoc 9:91" error message
    • 4120 bad parameter
    • [Web] - 500 Internal server error
    • Error in loading DLL when PDF conversion starts
    • Lotus Notes crash when inserting SwAttachments subform in the 6.5.4
    • New line character appears as a square box
    • Object library invalid or contains references to object definitions that could not be found (After M
  • FAQ
  • Support
    • Support Request
    • Premium Export Services
Powered by GitBook
On this page
  • Description
  • Solution
  • Syntax
  • Parameters
  • Return Value
  • Remarks
  • Code Example

Was this helpful?

  1. How to

How to sign PDF document

Description

I would like to sign newly created PDF document.

Solution

The DigitalSignature method is used to add a digital signature to a PDF document. Prior to digitally signing a document, the users or developers should have on their systems a digital certificate that can be used to sign documents.

Syntax

.DigitalSignature "Name of the signer", "Reason", "ImageFile", "Location", -1,0 ,0, 0 ,0 , 1 + 4 + 32

Parameters

SignerName This is the friendly name of the digital signature as it appears to the user when the digital certificate is installed on the system. In most cases, this is the full name of the person signing the document.

Reason Reason for signing the document. Can be an empty string if no reason is specified.

ImageFile Full path of the file containing the image that is associated with the signature. This is optional, a digital signature does not always contain an image.

Location Physical location of the person who signed the document. This parameter is optional.

PageNumber Page number on which to insert the signature. Page numbers start with 1, the value -1 indicates the last page in the document.

HorzPos, VertPos Horizontal and vertical position of the digital signature in Twips.

Width, Height Width and height of the digital signature in Twips.

Flags Combination of flags that determine how the digial signature appears on the page. A value of 0 indicates that the signature is invisible.

Return Value

This method returns 0 upon success, it returns one of the following exceptions upon failure:

E_NOTIMPL The license key that is provided does not enable digital signatures

E_ACCESSDENIED The document security settings do not allow the user to modify the document

E_INVALIDARG One of the arguments is invalid or the certificate does not allow signing documents

E_FAIL The signature already exists

Remarks

The Flags parameter can be a combination of one of the following values:

Signer name 1 Reason for signing 2 Location 4 Associated image 8 Date of signing 32 Signature type 64

Code Example

Sub Click(Source As Button)

Dim FilePathName As String Dim PDFApp As Variant Dim PDFDoc As Variant FilePathPDF = "C:\Temp\test.pdf" Set PDFDoc = CreateObject("cdintfex.document") With PDFDoc .Open FilePathPDF .SetLicenseKey SW_PDF_PRINTER_USER_NAME, SW_PDF_PRINTER_LICENSE_KEY .DigitalSignature "Name of the signer", "Reason", "ImageFile", "Location", -1,0 ,0, 0 ,0 , 1 + 4 + 32 .Save "C:\Temp\signed_PDF.pdf" End With End Sub

Notice: Signer should have certificate on his/her name in the Windows digital ID repository. This name should be set as the first parameter in the .DigitalSignature method.

PreviousHow to rename attachmentsNextHow to transfer Lotus Notes data to a MS Word header or footer

Was this helpful?