Is there a way to have coloured hyperref hyperlinks in the PDF, but have them print "as if" they were black?

Yes. Use

\usepackage[ocgcolorlinks]{hyperref}

This option must be given when loading hyperref. You cannot give it in \hypersetup.

With this option hypreref will make the colorlinks as Optional Contents Groups (OCG) with /PrintState/OFF and /ViewState/ON. Your pdf reader needs to support OCG.

Also, the default behaviour of hyperref is to draw a coloured box around links. This box does not print.


Try the (experimental) option ocgcolorlinks to the hyperref package. I don't think it's documented in the manual, but see http://www.tug.org/applications/hyperref/ftp/README for a description.


Another option, using ocgx2 package:

\usepackage{hyperref}
\usepackage[ocgcolorlinks]{ocgx2}[2017/03/30]

Similar to hyperref's ocgcolorlinks, but with additional support for

  • dvipdfmx/xelatex
  • dvips
  • breakable links across lines and pages (except dvips), based on Ben Lerners suggestion for line-breakable links

->Example of nested, line and page breaking OCG colour links:

enter image description here enter image description here