Sunday, October 26, 2008

Adobe Reader fonts

Here's another PDF tip while I'm at it: how to fix broken fonts in Adobe Reader in Ubuntu Hardy and Intrepid.

It seems Adobe Reader doesn't use font-config by default. If you open a pdf file that uses Arial or some other font that is installed in font-config, Reader will still replace it with a generic Adobe Sans font. To turn on font-config support, modify the /usr/bin/acroread launcher script and uncomment the following two lines:


Discovering QPDF

A friend of mine asked for help removing the restrictions on a PDF file he made a while ago. It seems he misplaced his original source file because of disk bloat and all that was left was a PDF file he created for the print shop. Of course, he couldn't remember the password he had used when he created the file.

A quick look through google came up with a simple solution: qpdf, available in universe:

QPDF is a program that can be used to linearize (web-optimize),
encrypt (password-protect), decrypt, and inspect PDF files from
the command-line.

Here's the command line that removed the PDF restrictions:

qpdf --decrypt infile.pdf outfile.pdf