[poppler] Page labels

Kristian Høgsberg krh at bitplanet.net
Mon Mar 21 00:21:19 PST 2005


Hi,

I've just committed support for PDF page labels.  This is hopefully a 
first step towards fixing my favourite itch with open source PDF 
viewers; the disconnect between the number you type and the actual page 
number.  For example with evince, going to page 10 gives you page 'x' in 
the document and page 37 is page '15' in the document.

The PDF spec makes a distinction between page indices, which start from 
0 and is the index of a page in the sequence of pages.  Page labels, on 
the other hand are the user visible names for the pages.  A page label 
consists of a prefix plus the numeric part of the label in either 
decimal, uppercase roman, lowercase roman, uppercase letters, lowercase 
letters or none.  The Catalog object has been extended with two new 
methods to map from an index to a label and from a label to an index.

This new functionality is exposed in the glib binding as a new function:

	poppler_document_get_page_by_label (document, label)

and as a 'label' property on the PopplerPage object.

Hopefully, this should be useful for evince and kpdf, and I look forward 
to finally getting page 10 when I type in '10' ;-)

cheers,
Kristian


More information about the poppler mailing list