3

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.

HSchmale
  • 531

1 Answers1

6

The following is reader-specific:

enter image description here

\documentclass{article}

\usepackage{fancyhdr,accsupp,lipsum}
\pagestyle{fancy}
\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule
\fancyfoot[C]{\BeginAccSupp{ActualText={}}\thepage\EndAccSupp{}}

\begin{document}

\lipsum[1-50]

\end{document}

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.

Werner
  • 603,163