PDF annotation under Linux with Wine and PDF-XChange Viewer
Changelog
- 2009/04/10, added script to open files from file manager.
I’ve long wanted a program to annotate PDFs under Ubuntu, but tried many options which all fell short in some way or another. Yet periodically I check to see if a new one has appeared and it seems my wishes have come true, though not through open source software.
PDF-XChange Viewer is a Windows freeware (pro version available too) which installed flawlessly under Wine (Windows emulator) in Ubuntu. In fact I had not used Wine up to this point, and I was surprised how indeed flawless the process was: ‘sudo apt-get install wine’, ‘wine installer.exe’. Bam. It just worked. And it loaded a huge PDF without flinching.
All is not so rosy, though, as the annotations and text won’t show up completely under Ubuntu default PDF viewer. But this had happened with annotations I had made with other programs, so I guess it has to do with Ubuntu’s viewer, not PDF-XChange. Indeed things worked a bit better under Xpdf.
The most surprising part in all of this is that the freeware beats other annotation options I had tried under Windows in the old days: it has many different ways of adding text to pages, different shapes to add and different highlighting options. So I guess I’d recommend that you try it even if you run Windows.
And a quick tip: you can add shortcuts for toolbar commands (including highlighting) by clicking right in the toolbar area, clicking “Customize…”, selecting the “Commands” tab, selecting “Highlight” under “Tools” and clicking “Properties”.
(Found via this post, from someone else who grappled with the other options)
Launching with “Open with…” (NEW 2009/04/10)
To open PDF files from the file manager, put the following script somewhere, change its file permissions to “executable” and use it for the “Open with…” command (adapted from here):
#!/bin/bash
# Then use this script as default to open PDF files
# Adapted from:
# http://sodeve.net/foxit-reader-on-ubuntu-linux-through-wine/
# Purpose: To convert Linux-style filename to Windows-style
# to pass as an argument to wine when starting PDF XChange Viewer
Filename="z:"${1//\//\\}
#assuming you use the default installation folder for PDF
# XChange Viewer in Wine
App='eval wine "C:\Program Files\Tracker Software\PDF-XChange '
App=$App'Viewer\pdf-viewer\PDFXCview.exe" "'$Filename'"'
$App

Geek:
It is not working..it is not being effective in open with…….I think what I am supposed to do is to write this as a file like pdfxchangeview2.sh in /usr/bin/ and use it for open with while browsing..right? But it is not working..
17 January 2010, 11:06 amFrancois:
Hi “Geek”. Yes I’m using it under Ubuntu with the Nautilus file browser. I right-click on some PDF, select “Open with > Open with other application…” and I browse to select the .sh file (I called it “openpdf.sh”, but whatever suits you).
I don’t think it’ll make a difference, but I placed it in my home directory (just make sure you have proper execution rights on the file).
On the other hand, I haven’t been able to get the script working under PCMan File Manager, which I use nowadays.
What I do is I launch the PDF viewer (from the Wine menu, say) and then select the file in “File > Open”. But it’s less convenient…
Hope this helps, somehow.
17 January 2010, 5:16 pmCharl Botha:
Thanks for writing this up!
I just followed your howto on Lucid Lynx (Ubuntu 10.04 on x86_64) with the PDFXChange 2.0 installer and wine1.2. Works like charm.
30 April 2010, 4:01 pmFrancois:
Thanks for the comment Charl. Glad to see others are using it! I myself still use it a lot under Ubuntu 9.10 (also 64 bit).
30 April 2010, 4:04 pm