Joshua Wood

Adding a signature to PDFs on Linux like Preview.app in macOS

tl;dr: xournal is the simplest application I’ve found that is able to accomplish this task (and relatively well).

Update: it looks like there is also some progress on adding support for eletronically signing documents in Evince (Gnome 3’s default document viewer) as well as a request to add support for graphical signatures!

I recently needed to sign a contract and return it via email. On macOS I would use Preview.app to view the PDF, place my signature, and export the signed copy.

It took me a lot of searching before I landed on a few good Linux alternatives, but they do exist.

What worked

xournal

xournal was the simplest app which was able to do exactly what I wanted. With xournal I was able to open a PDF from Nautilus (Gnome’s file manager), place and resize my signature and export a PDF that looked just like the original. To demonstrate this, I used this PDF and Barack Obama’s public domain signature. The resulting PDF is here, and here’s a screenshot of what it looks like in Gnome (not bad!).

I’ve seen reports that the PDFs exported from xournal could not be viewed on non-linux platforms, so I tested viewing the exported PDF in Preview.app on macOS and it displayed perfectly.

Master PDF Editor

Master PDF Editor seems like a nice full featured alternative to Acrobat. It has not only the ability to sign a document with your graphical signature but can also sign it with an electronic signature. I’m probably going to pick up a copy of this one at some point; it’s free for personal use and $49.95 for the commercial version (which includes the signature feature).

What didn’t work

Here’s a list of the other applications I tried (nothing against them, they just didn’t do exactly what I wanted):

  • Okular is the most full-featured document editor for Linux. It’s possible to add a custom signature by creating a custom stamp from an SVG or PNG file (see the KDE Help Center for instructions, under “Annotations”). In my experiments this produced very distorted looking images, however, and I couldn’t find how to move or resize the stamp once it had been placed. Okular is also a KDE application, and using it in Gnome (or other desktop environments) means pulling in a lot of KDE dependencies which I don’t otherwise need. It’s a very nice and complete app, however (and free).
  • LibreOffice Draw did not render the PDF properly; it seemed to convert the PDF to editable text and the fonts would get rendered incorrectly, among other things. The font issue may have been that it was looking for the fonts my system which is a headache I want to avoid (since I don’t need to edit the content).
  • GIMP does import PDF files, but it can only do a page at a time, and the resulting export is an image file (so you lose your original embedded information).
  • Inkscape was similar to GIMP. It can open the file, but doesn’t seem to export the original format correctly.
  • Adobe Acrobat 11 in wine. Instructions here. I was able to get it running, and it displayed my PDF fine, but crashed when I attempted to use the “Place Signature” tool.
  • Adobe Acrobat 9, available for arch here. This was the last (super outdated) version of Acrobat to support Linux natively. I didn’t even bother with this, because it’s stated obviously on the package page that it’s old and crashes reproducibly.

Other applications for working with PDF files

There are definitely other apps which I haven’t tried yet. The Arch wiki has a comprehensive list of them.

Comments


I'm Josh Wood, a tech entrepreneur and software developer. I founded Hint.io and Honeybadger.io. I'm all about building awesome apps! More »