I have recently been asked to add a digital signature to a report (which I wrote using pdflatex). Is there such a mechanism in the TeX/LaTeX world or am I better of using external software to verify the validity of the report.

I don't necessarily want to password protect the document...or prevent people from copying the text as they commissioned the report!

This may not be limited to TeX so my apologies if in the wrong forum...

  • Would something like the PDF Toolkit suit your needs?
    – Werner
    Commented Oct 3, 2011 at 15:41
  • from a basic skim through of PDF Toolkit as I was posting my original question I got the impression that it could be password protected with an owner pw and user pw. Would the user then have to enter the password every time they wanted to use/read/print the file? i'd be anxious to avoid this.
    – Leeser
    Commented Oct 3, 2011 at 15:45
  • @Leeser: If you only set the owner pw, every user should be able to view it; you could also restrict other operations like printing. Commented Oct 3, 2011 at 21:19
  • Couldn't you just take an md5 or sha1 hash to prove it had not been altered? It is pretty easy to break PDF passwords by my understanding. Now that is based on 1 PDF I had that I was trying to do a review of, that copy/paste was turned off on. Some tool I found (sourceforge?) made an unprotected copy with ease. So I could be totally wrong here.
    – Canageek
    Commented Oct 3, 2011 at 22:01
  • @Leeser Have you seen this post? tex.stackexchange.com/questions/88754/… Commented Jan 2, 2013 at 17:46

5 Answers 5


I've asked question on other side about proving that file has not changed after given time.

It's slightly different than signatures, but IMHO very important aspect of checking validity of report: checking if it has not been changed after creation (and legally provable).

One way of protection are Cryptographic Timestamps.

There are mechanisms based on PKI and digital signatures supported by Adobe PDF.

I've found that Linked Hybrid schemes are most interesting and Keyless Signatures - Cryptographic Timestamps Guard-time Technology looks most intersting and promising with nice cross-platform desktop client and other tools.

  • I think this is the thrust of my original question..how to ensure the file prepared has not altered any way upon transmission etc...but kinda got morphed to file protection, access and printing restrictions...
    – Leeser
    Commented Sep 22, 2012 at 16:11
  • I've addressed your main requirement: "verify validity". I hope external tools I use will be useful for you or other readers if your question. Commented Sep 24, 2012 at 11:11
  • Your first link is broken - I think the site was shut down.
    – David Z
    Commented Oct 16, 2016 at 10:35
  • Most of the links are broken
    – JPi
    Commented Jan 23, 2017 at 17:55

If you don't want a password-protected PDF, you could just send a GnuPG signature, for example:

$ gpg -sb RaphaelPinson_en.pdf

This produces a file named RaphaelPinson_en.pdf.sig, which you can send along with your original PDF.

To check the signature, use:

$ gpg --verify RaphaelPinson_en.pdf.sig

with the original PDF file in the same directory. Provided your GnuPG key is trusted by the recipient, this is a strong authentication of the content.

  • 2
    Can the downvoter explain why?
    – raphink
    Commented Aug 5, 2012 at 7:47

Adding a digital signature to a PDF that is recognized by PDF viewers like Adobe Acrobat (are there other viewers that can handle them?) is a relativ esoteric subject; I know only one free software (jPdfSign) that can create them. OTOH there are many programs that can encrypt a PDF (e.g. QPDF).

  • 1
    I had a discussion with our IT department and basically I was told that I should use the standard that the commissioner of the report is using. They probably have a digital signature system, and they would supply me with a client to read their content and also encrypt my own.
    – Leeser
    Commented Oct 7, 2011 at 13:35

Using the PDF Toolkit you can specify a separate owner and user password. Owner passwords are required when changing document properties, while user passwords may be required for performing certain actions, like printing. However, only specifying an owner password and allowing printing by default, would allow users of the document to view/read/print without authentication. Here's how:

pdftk input.pdf output output.pdf owner_pw foo allow printing

The above commands takes as input input.pdf, sets the owner password to foo and would allow printing on by any user. Modification of document settings require the owner password. See the documentation/man page and examples for more information.

It is possible to automate the above scripts by adding it to your LaTeX makefile (or as part of a building profile in TeXnicCenter, for example) such that it executes after compiling your document.

  • if I only specify a user password and allow printing, does the user have to type in the password every time they open the file? I'm thinking of the case where the file will be read by numerous people in different departments and then each one having to input a password each time...
    – Leeser
    Commented Oct 4, 2011 at 9:20

You could use the Okular-GUI >v21.04 (or poppler API) for adding to your PDF digital signatures with PKCS certificates.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .