# [Tex/LaTex] How to change the page numbers displayed in a pdf viewer

page-numberingpdf

I'd like to prepare a LaTeX file of a part of a larger volume, containing for example pages from 50 to 60. Is there a way to do it so that a pdf viewer does not display "1" but "50" on the first page and so on? I tried \setcounter{page}{49}, but it didn't work.

This can be achieved by loading the hyperref package. It will store the logical page numbers as page labels in the PDF. This also allows for non-numeric labels like roman numbers for the frontmatter.