28

We are using Acrobat digital signatures in my organization. Digital signatures are data structures created using the application of public key infrastructure (PKI) technology. They are different from "electronic" signatures or "digitized signatures," which are simply digitized handwritten signatures that are pasted onto a document.

With Acrobat Professional you can put in a signature block that allows signing with a client-side digital signature. This is something that can be then done by someone using Acrobat Reader. This is not the same as adding a digital signature to the document—this is adding a space where a signature can be added by someone else to indicate acceptance of the produced PDF.

How do I create a PDF file with LaTeX that can be digitally signed?

vy32
  • 4,780
  • I just noticed you're asking about something slightly different, about "a PDf file that can be digitally signed". Does the other question still help you? – doncherry Apr 07 '12 at 16:15
  • 1
    Correct, this is completely different. I will update the question. – vy32 Apr 07 '12 at 16:27
  • Thanks for clarifying. (I can't revoke my close vote, but I don't think this question will be closed now.) So I assume you've tried just compiling a document with pdfLaTeX and then signing it, and it didn't work? Do you have any idea what "property" the document is missing so that it could be signed? – doncherry Apr 07 '12 at 17:58
  • That doesn't create a signature box. – vy32 Apr 08 '12 at 02:39
  • I was able to do it by combining a previously generated singable PDF file with Acrobat and embedding it in a LaTeX file with pdftk, but that's kind of round-about. – vy32 Apr 08 '12 at 02:41
  • Use PortableSigner!! http://portablesigner.sourceforge.net/ Tabaré Pérez tabare.perez@gmail.com –  Jun 05 '14 at 19:37

1 Answers1

24

In order to be able to sign a document using Adobe Reader or Adobe Acrobat, you need a so-called signature field in your PDF, which is a special kind of form field. In order to add it to a file you have the choice between two different LaTeX packages:

The digsig package

This is a small package that enhances the form capabilities of the hyperref package to support signature fields. It is not available on CTAN, but you can find it on the author's website. To use it, simply add \usepackage{digsig} to the preamble of your document (if you're already using hyperref, load it after \usepackage{hyperref}). Now you can add signature fields to your document using the \digsigfield macro, which expects the width and height of the form field and a freely chosen name. Note that you have to enclose the command in a Form environment, like this:

\documentclass{article}
\usepackage{digsig}
\begin{document}
\begin{Form}
  \digsigfield{5cm}{3cm}{My signature}
\end{Form}
\end{document}

The eforms package

eforms is another package to create PDF forms, with support for signature fields. You can find it on CTAN, but it is not included in TeX Live, so you may have to install it manually. It is very similar in use to the digsig package:

\documentclass{article}
\usepackage{eforms}
\begin{document}
\sigField{My signature}{5cm}{3cm}
\end{document}

In both cases, the output is a rectangular field you can fill with a digital signature using e.g. Adobe Reader or Adobe Acrobat:

a signature field as displayed by Adobe Reader

Note that many other PDF viewers don't support these fields and won't display anything at all. A "live" example of a signature field can be found in the eforms manual on page 17.

diabonas
  • 25,784
  • 1
    JFYI: eforms belongs to acrotex bundle and is installed in a full installation of MiKTeX. – Speravir Apr 21 '12 at 22:53
  • 1
    The "author's website" listed above for digsig is having issues. I found an updated site here: http://home.htp-tel.de/lottermose2/tex/index.html –  Dec 28 '12 at 18:00
  • @mike Thanks for the hint, I've updated the answer :) – diabonas Dec 29 '12 at 13:02
  • @diabonas Is it possible to make this 'Reader Extended' as described here? http://forums.adobe.com/thread/510585 – Nicholas Hamilton Dec 31 '12 at 05:56
  • @ADP I'm afraid this is only possible if you purchase the commercial Adobe Acrobat Pro: According to this product comparison, "[c]ertificate signing in Reader requires enablement in Acrobat XI Pro." – diabonas Dec 31 '12 at 14:40
  • @diabonas Thanks, I F**king hate adobe, bunch of nazis. – Nicholas Hamilton Dec 31 '12 at 14:41
  • @diabonas, do you know the answer to this? http://tex.stackexchange.com/questions/88754/locking-fields-in-digital-signature – Nicholas Hamilton Jan 01 '13 at 05:37
  • @diabonas when I made a pdf file using the digsig package and the above LaTeX code, I tried signing it, and it did not seem to work. When I looked in "Document Properties" in "Document Security" it says "Signing: Not Allowed" I am using acroread 9 on Ubuntu 14.04, with texlive 2015. What might I be doing wrong? – A Feldman Feb 18 '16 at 12:33
  • @AFeldman Unfortunately, signing a PDF directly with the free Acrobat Reader is only possible since version XI, which sadly isn't available for Linux. For older versions, you would have to enable usage rights for Adobe Reader using the commercial Acrobat Pro first in order to be able to sign it with the free reader. – diabonas Feb 18 '16 at 22:14
  • @diabonas I'm confused, A Feldman's comment was referring to LaTeX. Why would a PDF generated by LaTeX need to be edited by Adobe Acrobat? Is this a mistake on your part, or am I misunderstanding? – Hashim Aziz May 30 '20 at 23:59