[texhax] Hyperref and print

Paul Gessler pdgessler at gmail.com
Tue Jul 14 02:32:37 CEST 2015

Hi Michael,

You can also use the ocgcolorlinks option when loading hyperref. This
puts the link colors in Optional Content Groups (OCGs) inside the PDF.
When viewed on-screen, the color is shown, but when printed, the link
appears black. I've used it with success in many documents.

The disadvantage is that the package code does not support linebreaks
within URLs when this option is set. A workaround for this limitation
was devised by Ben Lerner; the code for which is available at TeX
Stack Exchange if you require it:
http://tex.stackexchange.com/a/47309/21344 . Please take note of the
caveats mentioned in the answer if you decide to use the code. They
could prove to be a serious drawback in a high-volume production
environment such as a journal.

Good luck with the experiments!


On Mon, Jul 13, 2015 at 7:11 PM, Reinhard Kotucha
<reinhard.kotucha at gmx.de> wrote:
> On 2015-07-13 at 19:00:17 -0400, Michael Barr wrote:
>  > The journal I do some of the TeXnical editing for is experiment
>  > with \hyperref.  We like the colorlinks=true option and have
>  > experiment with different colors.  But if the link is in a color,
>  > B&W printers, at least the ones we have experimented with, print it
>  > lighter than the surrounding text.  Is there any of doing it so
>  > that the hyperref code displays onscreen, but is suppressed in the
>  > print?
> There are at least two solutions:
>  1. avoid colorlinks=true for printing
>  2. use darker colors
> It'a a matter of fact that most colors defined by hyprerref are too
> bright.  They are even much too bright for display on screen.
> The best thing you can do is to replace hyperref's default colors by
> darker ones.
> Dark colors are handled more gracefully by B&W printers.
> Regards,
>   Reinhard
> --
> ------------------------------------------------------------------
> Reinhard Kotucha                            Phone: +49-511-3373112
> Marschnerstr. 25
> D-30167 Hannover                    mailto:reinhard.kotucha at web.de
> ------------------------------------------------------------------
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org

More information about the texhax mailing list