[Tex/LaTex] have hyperlinks a different color for printing

hyperreflinksprinting

Is it possible to print hyperlinks in the same colour as the surrounding text when printing a hard copy of a PDF?

When a PDF is printed on paper I would like the links to be the same colour as the surrounding text. Is this possible?

Best Answer

hyperref has the option ocgcolorlinks which does exactly what you want.

From hyperref's README

Experimental option ocgcolorlinks

The idea are colored links, when viewed, but printed without colors.

This new experimental option ocgcolorlinks uses Optional Content Groups, a feature introduced in PDF 1.5.

  • The option must be given for package loading:

      \usepackage[ocgcolorlinks]{hyperref}
    
  • Main disadvantage: Links cannot be broken across lines.

....

Beware of the fact, that, however, "Links cannot be broken across lines" with this option, so, if you need this, you'd better use colorlinks option and print in "black and white".