Digital signatures

Docotic.Pdf can sign PDFs with digital signatures and can check if the signed part of a document was changed after signing.

Digital signatures resources

You can sign documents with digital signatures. It is possible to sign already signed documents without invalidating existing signatures. You can specify which fields to lock after signing. The library supports embedding timestamps in digital signatures.

Docotic.Pdf can read signature properties, check if the document was tampered with after signing, check if the signature certificate is revoked.


Check the articles about features of the library related to digital signatures.

Sample code

These sample codes illustrate different approaches to signing documents with digital signatures.

  • Sign document
    Create digital signatures using different digest algorithms (SHA-1, SHA-256, SHA-384, SHA-512, RIPEMD-160) and different signature formats (adbe.pkcs7.detached, or ETSI.CAdES.detached).

  • Sign an already signed PDF document
    Sign PDFs without invalidating signatures already applied to the file. It does not matter who and how signed the document before.

  • Sign a PDF form by multiple people
    Get a PDF form sequentially signed by multiple people.

  • Sign PDF document and embed a timestamp
    Get a timestamp from the specified Timestamp Authority and embed the timestamp into the signature.

  • Signature fields
    Add regular and invisible signature fields to PDF documents.

  • Sign signature field
    Sign a specific signature field that already exists in a PDF document.

  • Sign signature field using custom style
    Provide custom labels or images. Specify if you want the signing date and the certificate Distinguished Name visible in the signed field.

  • Sign signature field with lock
    Create and sign a signature field with lock. The signature field lock specifies which fields should be locked after the signing.

  • Read signature properties
    Read the name of the signer, the time of signing, the signer's contact info. Access the signing certificate embedded in the digital signature.

  • Verify signature
    Check if the signed part of a PDF document was changed after signing, if a signature contains embedded OCSP and/or CRL data, if the signing certificate is revoked on a given date.