9

I'm creating a fancy header with hyperlinks (see here) for a large document. However, if/when this document is printed, this header is not useful and uses up ink and space. Is it possible to include an element in a pdf file such that it is not actually printed to paper but does display on screen?

  • Most likely PDF annotations would be the way to go. However, this may be viewer-dependent. – Werner Jul 6 '13 at 17:16
  • 1
    By default, hyperref creates boxes around links tht are not printed. So at least conditional printing is possible for rules/lines. – Aditya Jul 6 '13 at 19:50
  • 1
    Can we achieve this using PDF layers? A combination of non-printable and printable layer? – Jagath Jul 7 '13 at 5:15
7

Jagath already mention a solution in his comment:

Can we achieve this using PDF layers? A combination of non-printable and printable layer?

Heres the corresponding MWE:

\documentclass{scrartcl} 
\usepackage{ocg-p} 
%%%%%%%%%%%%%%%
\begin{document}
text

\begin{ocg}[printocg=never]{Notprinted}{noprint}{1}
This paragraph is never printed
\end{ocg}

Text after non print 
\end{document}  

I tested it with Sumatra and Acrobat XI.

With the same technique you may also put things on a print, but not on a screen:

\documentclass{scrartcl} 
\usepackage{ocg-p} 
%%%%%%%%%%%%%%%
\begin{document}
test

\begin{ocg}[printocg=always]{Onlyprint}{onlyprint}{0}
This paragraph is printed, but not shown by default
\end{ocg}

test after
\end{document}  

Lets combine it with a coffee stain, an image of a fly ;)

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.