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.

1 Answer 1


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).

  • As if I recall that I once saw this.
    – Adam L. S.
    Oct 10, 2012 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, 2012 at 22:04
  • \special cannot be output after the last page. Oct 10, 2012 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, 2012 at 23:26
  • But it can't be set in \AtEndDocument, because the last page might already be output. Oct 12, 2012 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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