I've been asked to distribute electronic certificates (they were originally paper), in a PDF format, but I'd like to sign them with gpg or something similar so users can upload them to my site to check that they've not been handed a fake copy.

So, I'd like to sign a PDF file (transparently, the user doesn't need to know about anything) and check if its valid.

  • 1
    PDFs have their own signing system; you should ask about it on stackoverflow.com, you'll get an answer there. Jul 14, 2015 at 15:29
  • Questions on this topic could be posted on Stack Overflow if you're asking how to write a program to do this, or here if you're asking for an existing program that does this. @StephenKitt This question is on-topic here, asking for existing programs. Jul 14, 2015 at 16:35
  • 3
    @Liczyrzepa Super User is not “another stackoverflow site”, it's another Stack Exchange site. Stack Overflow is about programming, Super User is about computers (mainly PC running Windows but also some other systems). This question would also be on-topic on Super User, but it's fine here on U&L. In any case, do not post the same question on multiple sites. Jul 14, 2015 at 16:36
  • @Gilles Right, I stand corrected ;-). I suggested SO because I know there are a few PDF experts there. Jul 14, 2015 at 16:50

1 Answer 1


You can do it with a separate signature file.

  1. Sign the Document:

    % gpg --output doc.pdf.sig --detach-sig doc.pdf

  2. Distribute doc.pdf and doc.pdf.sig

  3. Verify the Document:

    % gpg --verify doc.pdf.sig doc.pdf

  • 1
    This is what I needed, although I won't distribute the .sig, I'll keep it to verify server-side Jul 15, 2015 at 18:20

You must log in to answer this question.

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