Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

there are some PDF files that some reader displays the printed page number as the current page number. I also saw, that this can be achieved in latex with hyperref package. what I'm look for is what\special command I need to achieve the same result; I can't find it in the PDF reference.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

The page labels are set in the /Catalog object:

\special{pdf:docview <</PageLabels<< ... >>>>}

Example: title, i, ii, 1, 2

\special{pdf:docview <</PageLabels<</Nums[0<</P(title)>>1<</S/r>>3<</S/D>>]>>>>}

In the PDF reference it can be found in section 12.4.2 Page Labels on page 374 (382 of 756).

share|improve this answer
As if I recall that I once saw this. –  Adam L. S. Oct 10 '12 at 7:26
The good feature about this is that it can be issued anywhere in the document, so I can make a macro, that collect all the page numbering formats, and then puts this special command at the end of the document. (I'm not sure that it is good practice though.) –  Adam L. S. Oct 10 '12 at 22:04
\special cannot be output after the last page. –  Heiko Oberdiek Oct 10 '12 at 22:57
I didn't said that. But it can be put at the end of the last page. –  Adam L. S. Oct 11 '12 at 23:26
But it can't be set in \AtEndDocument, because the last page might already be output. –  Heiko Oberdiek Oct 12 '12 at 0:42
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.