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.
Asked
Active
Viewed 232 times
3
1 Answers
6
The following is reader-specific:
\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:
Note how the page number (1) is selected.
Werner
- 603,163


\pagerefor in\cite- generated references? – Apr 20 '17 at 20:42linenoline numbers? – Werner Apr 20 '17 at 20:59