Is there any way in pdflatex to make the page numbers non selectable in the outputed documents. I know that there are some pdfs floating around out there where the page number is not included in selects. By page numbers I mean the ones placed at the bottom of each page to mark the current page, not those placed by using a reference command.

  • Which page numbers do you mean? In the ToC/LoF/LoT/ListOfWhatever? In a page reference by \pageref or in \cite - generated references? – user31729 Apr 20 '17 at 20:42
  • @ChristianHupfer Updated question to be more clear. I mean the page numbers that mark the page as being that page. – HSchmale Apr 20 '17 at 20:49
  • Would it be enough if the pagenumbers would not be included if the selected text is copied? – samcarter_is_at_topanswers.xyz Apr 20 '17 at 21:24

The following is reader-specific:

enter image description here


\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule




accsupp provides the ability to set content in the document, but let the rendered PDF have it think it's something else.

As mentioned, it's reader-specific. Here's the same selection-view within SumatraPDF:

enter image description here

Note how the page number (1) is selected.

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.