Introduction: Effective PDF Annotations on Linux

About: C64er, A500er, Linuxer.

Ever needed to annotate PDF documents on Linux ? I'm not talking about creating PDFs, which can be done with a number of tools including latex+dvipdf, pdflatex, LibreOffice or others. I'm talking about adding your own annotations on top of an existing PDF file, i.e., highlighting or underlining existing text, adding boxes, writing notes on the side of the text or pictures, etc... Linux happens to have a number of tools with said functionality, many of them being open-source, like Xournal, Okular, even LibreOffice itself, or others. And, yes, even latex can be used to annotate existing PDFs, but NOT in a WYSIWYG way!

However, many of these tools do not have a full set of features that come handy in this regard, IMHO, or at least not a set that is as complete as the ones available in the excellent PDF-XChange Editor from Tracker Software, free of charge for "home, academic or non-commercial" use only.

What are the must-have features that make this piece of software so unique for me ? Here we go:

  • it's fast: I can launch it and open PDF files just as quickly as I do with evince on Linux;
  • you can find all the recurrently needed annotation tools: text highlight & underline, text strike-out, add text with customizable font, add boxes, lines, arrows, with customizable colors/properties, and also add generic images/stamps;
  • save the recurrently used formats for all the annotation tools in pre-defined styles;
  • supports text recognition via OCR for an easy annotation of scanned PDFs (text highlight & underline);
  • it has customizable keyboard shortcuts for quick selection of the annotation tools;
  • annotations are saved as a separate layer on the original PDF, so you can easily share them with others by sharing the annotated PDF file.

I just stumbled across this tool a few years ago, and it immediately became part of my daily workflow, albeit being available on Windows platforms only.

Therefore, in this guide I'll walk you through installing correctly the PDF-XChange Editor/annotator on Linux, using wine. Why do we need a tutorial/howto, then ? Well, long story short: just be sure to install it on top of the 32-bit wine, or the text annotation tool won't work (details here).

Step 1: Ensure to NOT Have the 64-bit Wine Installed

The following refers to a Debian-based system, and specifically Ubuntu 17.10:

  • check whether you have wine32 or wine64 installed, i.e., type into a terminal:
$ dpkg -l | grep wine64
  • if the above command shows you have win64 installed, then remove it:
sudo apt-get remove wine64
  • backup your old $HOME/.wine folder, useful to avoid clash between possible prior runs of wine64 and runs of the 32-bit wine, as they produce $HOME/.wine folders that are not compatible with each other;
mv ~/.wine ~/.wine-bak

Step 2: Install the 32-bit Wine

Install the 32-bit wine on Linux:

sudo apt-get install wine32

After this, checking what version of wine you have, should bring you to something like this:

$ dpkg -l | grep wine
ii fonts-wine 2.0.2-2ubuntu1 all Windows API implementation - fonts ii libwine:i386 2.0.2-2ubuntu1 i386 Windows API implementation - library ii wine-stable 2.0.2-2ubuntu1 all Windows API implementation - standard suite ii wine32:i386 2.0.2-2ubuntu1 i386 Windows API implementation - 32-bit binary loader ii winetricks 0.0+20170823-1 all package manager for Wine to install software easily

Step 3: Download and Install PDF-XChange Editor

  • download the Zip Installer from Tracker Software:

  • unzip it, to extract PDFXVE7.exe:

  • launch the installer:

wine PDFXVE7.exe
  • follow the on-screen installer instructions (next, next, next...)

Step 4: Create a Handy Command-line Shortcut

  • add to your ~/.bashrc:
alias pdfxedit='wine ~/.wine/drive_c/Program\ Files/Tracker\ Software/PDF\ Editor/PDFXEdit.exe 2> /dev/null'

use the alias to conveniently open & edit a PDF file (spawn a new terminal first, in order for the new alias to be picked up from $HOME/.bashrc):

pdfxedit /path/to/file.pdf