In my PDF document, while opened in the PDF viewer (AR), I would like to have coloured text as hyperlinks instead of boxes.

So I set the package option ocgcolorlinks with hyperref, because links should come out as black (the default text colour) when printed on paper.

However, if I run latex on my document source (I am using the dvips+ps2pdf route) I get the warning message

Package hyperref Warning: Driver does not support `ocgcolorlinks',
(hyperref)                using `colorlinks' instead on input line 66.

and I get coloured link text on paper.

Recently, Ghostscript was added support for OCGs (PDF Layer). In theory, it should now be possible to make the ocgcolorlinks option functional with dvips+ps2pdf.

How difficult would it be to implement this? Moreover, it would be nice to make ocgcolorlinks compatibile with the ocgx and ocg-p packages at the same time, as shown here for the other workflows (dvipdfmx, xelatex). (Those packages are used to put text on PDF layers.)



Option ocgcolorlinks has been made available for use with dvips+ps2pdf through pkg ocgx2:


This implements the ocgcolorlinks option for hyperref for use with dvips+ps2pdf.

Now, ocgcolorlinks works with all known drivers/engines. Also, the incompatibility with the PDF-Layer producing packages ocgx and ocg-p is fixed.


% this loads ocg-p automatically; enables OCGs for dvips/ps2pdf (GS-9.15)



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.