# Setting color LaTeX generated PDF to print in black & white

I use LaTeX to generate PDF, and I see that colorful PDF is good for reading on screen but not so good with printing and reading.

Is there any way to disable the color setting to make it all grayscaled colors? As in, is there any option in the LaTeX color package to make all the colors only come out black?

-

## migrated from stackoverflow.comJul 19 '10 at 21:01

This question came from our site for professional and enthusiast programmers.

Just change your printer settings. – Larry Wang Jul 19 '10 at 19:32
It might depend on which LaTeX color package you're using. – David Z Jul 19 '10 at 22:31
I have to admit: I know that some printer drivers have support for disabling colors in text while leaving other elements as they are. Maybe this might help? – lajuette Jul 20 '10 at 15:01

This (as I read the question) has nothing to do with printers, and appears to belong on stackoverflow, where it started.

The color package has a monochrome option which turns all of the colour switching off:

\documentclass{article}
\usepackage[monochrome]{color}
%\usepackage{color}
\begin{document}
Hello \textcolor[rgb]{1,0,0}{World}!
\end{document}


Is that what you were looking for? It turns everything black and white rather than greyscale.

-
Not enough: included graphics will still be in colour. – Charles Stewart Jul 20 '10 at 10:06
True. If transforming included graphics to monochrome is indeed a requirement, then that'd need something downstream of LaTeX. If not, then this will remove all (?) LaTeX-originating colour. – Norman Gray Jul 21 '10 at 8:27

I assume your links were created with the Hyperref package and that you want to view the colored links on screen yet print to paper all text in grayscale.

From the Hyperref documentation over at http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/

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.

• Main disadvantage: Links cannot be broken across lines. PDF reference 1.7: 4.10.2 "Making Graphical Content Optional": Graphics state operations, such as setting the color, ..., are still applied.

Therefore the link text is put in a box and set twice, with and without color. * The feature can be switched of by \hypersetup{ocgcolorlinks=false} inside the document.

• Supported drivers: pdftex, dvipdfm

• The PDF version should be at least 1.5. It is automatically set for pdfTeX. Users of dvipdfmx set the version on the command line: dvipdfmx -V 5

From what it says, you will need to make sure your links do not break across lines. There are several ways of doing this, like using ~ instead of spaces between words, surrounding the link with an \mbox or coding some sort of penalty in a custom url-type command.

On the other hand, if you do not want to see the colors on the screen or on paper, just set the option colorlinks=false` when calling the hyperref package.

-

You can Ghostscript to convert a colour PDF to greyscale. See http://handyfloss.net/2008.09/making-a-pdf-grayscale-with-ghostscript/ .

However, you'd get the same result just setting your printer settings to "greyscale" before printing, so this may not b eworth the hassle.

To get a nice greyscale document, it is probably better to manually adjust the colors in LaTeX so it uses only grey. That way you get to control which greyscales are used, to make sure highlightings and other things remain readable.

-