PDF Signatures
This library supports electronically signing PDF documents, including approval and certify signatures as well as visual signatures. Supported PDF signature types are:
- adbe.pkcs7.detached, which is the default PDF document signature as used by Adobe and the most common type of signature
- ETSI.PAdES/ETSI.CAdES.detached, which is ETSI/eIDAS compliant (needs special Certificates provided by eIDAS Trust Service Providers!)
Default PKCS#7 PDF signature
This is the default PDF Signature type, typically used with Certificates provided by an organization on the Adobe Approved Trusted List (AATL).
There are 2 types of signatures possible:
- CERTIFICATION
- Can only be applied once to a PDF document!
- It acts like a seal, which typically is organization or department wide.
- A blue bar will appear with name of the signer, the company and the CA that issued the Certificate
- Allows to protect the document for further modifications at several levels
- Optionally showing an image of the signature. Clickable to show more information
- APPROVAL
- Can be applied multiple times.
- This is what typically is being used for people signing the document.
- It is comparable to a user signing a paper based document.
- The signature shows the name and additional information.
- Optionally showing an image of the signature. Clickable to show more information
PKCS#7 configuration options
The below options are part of a configuration, but can typically also be provided on every invocation. This allows to use the same certificate/key for instance for signing by multiple people by changing the signerName and related properties.
Example PKCS#7 flow
Below an example is provided where a local Signing Service and a Local Azure Keyvault Key Provider is being used to sign with a certificate on the AATL list, resulting in “blue-bar” signatures. The example key vault settings can be found above. The createSignature/verifySignature/getCert(s) methods would use the Azure Keyvault REST API, so we will be creating a digest first to ensure we are not sending the document to Azure Keyvault.
ETSI eIDAS PAdES detached PDF signature
This is the eIDAS/ETSI compliant PDF Signature type, used with Certificates provided by eIDAS Trust service providers.
PAdES configuration options
The below options are part of a configuration, but can typically also be provided on every invocation. This allows to use the same certificate for instance for signing by multiple people by changing the signerName and related properties.
Example PAdES flow
Below an example is provided where a local Signing Service and a Key Provider using a Hardware Security Module accessed using the PKCS#12 interface with a certificate provided by a Qualified Trust Service Provider.
Visual PKCS#7 and PAdES signatures
It is possible to create visual signatures. These signatures show an image of a ‘wet signature’ by providing an image file, or alternatively they are created from provided text. These visual signatures will show up in the document, and can be clicked upon to show more information.
Both PAdES and PKCS#7 type of PDF signatures have option to add visual signature options in their respective SignatureFormParameters
PKCS#7 Signature Form Parameters using an image
PKCS#7 Signature Form Parameters using text
Signature Image Parameters is the main class to configure Visual Signatures.
The Signature Field Parameters define the location and dimensions of the signature
Signature Image Text parameters define text and the appearance to place in the visual signature