Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

As you know, the option ocgcolorlinks of the hyperref package disables colors of all links presented in a PDF file by printing it from Adobe Reader (and by compiling with e.g. pdflatex); as a result, they are printed in a default color.

My questions are:

  1. Is it possible to disable not the color, but entire text (of the link), i.e. that it would be completely disappeared on the printed paper?
  2. Is it possible to do the same with an arbitrary text (i.e. not with the text of the link) or with an arbitrary figure?
share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

What you're looking for is the various ocg* packages, as this kind of features is referred to as »Optical Content Group«. You may want to try out this trippy showcase. What's nice about this method is that the affected passages aren't simply turned white, but are disabled properly. So this is even going to work on a more sophisticated background (such as an image, a gradient fill, etc.).

This is an example using the ocg-p package:

\documentclass{scrartcl}
\usepackage{ocg-p,hyperref}

\begin{document}
Print me!
\begin{ocg}[printocg=never]{name}{id1}{1}
Print me! \url{http://tex.stackexchange.com/questions/103824/}
\end{ocg}
\end{document}

Note the print preview:

print preview with ocg-p

share|improve this answer
    
Thank you! The ocg-p package is so fresh (of 2013) that I even couldn't find it initially among my MiKTeX packages. Synchronization rules! :) –  Jordan Mar 24 '13 at 17:41
add comment

ad 1:

hrefhide – Sup­press hy­per links when print­ing

This pack­age pro­vides the com­mand \hrefdis­play­only (which pro­vides a sub­sti­tute for \href). While the (hy­per­linked) text ap­pears like an or­di­nary \href in the com­piled PDF file, the same text will be “hid­den” when print­ing the text. (Hid­ing is ac­tu­ally achieved by mak­ing the text the same colour as the back­ground, thus pre­serv­ing the lay­out of the rest of the text.)

http://www.ctan.org/pkg/hrefhide

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.