technology and zen of life

“A heisenbug (named after the Heisenberg Uncertainty Principle) is a computer bug that disappears or alters its characteristics when an attempt is made to study it.”

PDF support for multiple page numbering styles

You want your book to use Roman numbers for the first few pages, and Indian (often called “Arabic”, although the Indians invented them) numerals for the rest of your book? PDF supports multiple page numbering styles, even in the same document. This was added since PDF version 1.3, and can be found in the 1.7 specification under “12.4.2 Page Labels”.

Each page in a PDF document shall be identified by an integer page index that expresses the page’s relative position within the document. In addition, a document may optionally define page labels (PDF 1.3) to identify each page visually on the screen or in print. Page labels and page indices need not coincide: the indices shall be fixed, running consecutively through the document starting from 0 for the first page, but the labels may be specified in any way that is appropriate for the particular document.

Unfortunately, not all PDF readers follow the specs. I have tried a few common readers under Windows, all of them recently updated. Acrobat Reader X and Nitro PDF Reader 1.4 (beta) do great. Sumatra 1.5 and PDF-Xchange_2.5 fail miserably.

Linux applications show the same variety. I used ISO images from the latest Fedora 15 distribution. Evince 2.91, the default PDF viewer when using Gnome, did great. But for KDE, Okular 0.12.1 failed badly. (2011-07-19 update: Daniel Oberländer submitted a patch to KDE bug 187237 enabling page labels.)

Screenshots are shown below. I didn’t test a Mac, sorry guys.

Development version of KDE Okular (patched by Daniel):

Okular with Page Labels

About Evert Mouw

Interested in kinda everything, studied political science, now studying medical informatics. MCSE, Linux enthousiast, and believing that technology is the path to enlightenment ;-) Best RTS game ever is Warhammer Soulstorm (IMHO). Other hobbies include hiking, kayaking, reading and when I have time, trying to have an ant colony in an artificial nest (formicarium).

Leave a Reply

One Response

  1. […] in 2011, I ran a few tests and posted the results on TechMonks. At that time, Okular (KDE) did not support Page Labels, for which I filed a bug, which has been […]

Email Subscription

Disclaimer

The views expressed on this blog are personal. We do not claim to be a representative voice of the views of any organisation whatsoever. We are not responsible for the content present on the blogs to which we have linked.Views expressed are solely that of the author and does not reflect a collective opinion of contributors.
%d bloggers like this: