I am interested in displaying some things (e.g.: title page) in full color on screen, while having the same object/page display in a black and white friendly form when printed.

According to this SO question, there is built-in functionality in the PDF specification for Screen-Only objects and Screen-And-Print objects. There may also be a way to add a layer on top of the B&W page that only displays the full color page on screen via the PDF 1.5 Optional Content Groups feature.

Similarly, this question demonstrates the selective printing of text via ocg-p. But it is not clear how I can use this package in the way that I need to.

My scenario is compounded by the fact that my color page text is white on a dark background.


This code presents the way I am currently switching back and forth between color and b&w. I change the printincolor bool variable to make the change.



% Will set color title page and section headings

% Setup color if needed


% Begin Title Page
  {\ifbool{printincolor}{\color{white}\sffamily}{\sffamily}%  Set text color white or leave [default] black
  \ifbool{printincolor}{\includegraphics[width=1.5in]{logo-gold}}{\includegraphics{logo-blue}}% put logo gold or blue
  \\ \vskip 1in
        \vskip 0.1ex\rule{0.5\textwidth}{0.8pt}\vskip 1ex

  John Doe and Jane Doe\\


How can I layer (or otherwise display) two versions of the title page in a way that color displays on screen, but black and white is printed?

1 Answer 1


The solution I have come to (with many thanks to cfr and Steven B. Segletes for their answers to my related question) uses tikz to lay down a color layer, and then overlay that with a monochrome version that is only displayed when printing.

However, since the solution uses Optional Content Groups (package ocg-p), it does not have full support in all PDF viewers. Specifically, Adobe Reader is the only viewer that fully supports OCG, while many other (Apple's Preview, Skim and others) will fallback to the monochrome version (they simply show all layers on screen by default, not respecting the "print-only" or "initial state" flags). A few viewers (those based on poppler, i.e. primarily those in Linux) will degrade by only showing the color layer on screen and print (respecting the "initial state" flag, but not enabling the monochrome layer for print). So, bottom line is, Your Milage May Vary.

But, here is the solution nonetheless:


\usepackage{tikz} % Needed to draw titlepage elements
\usepackage{ocg-p} % For optional content groups

% Things to typeset on titlepage (since they are repeated twice
    \node [font={\huge\bfseries\sffamily}] at (.5\linewidth,-7) {Title};
    \node [font={\huge\sffamily}] at (.5\linewidth,-10.625) {Subtitle};
    \node [font={\large\sffamily}] at (.5\linewidth,-17) {Authors:\\ John Doe and Jane Doe};
    \node (p) at (.25\linewidth,-9.00) {}; % nodes for line to connect later
    \node (q) at (.75\linewidth,-9.00) {};

% Setup color if needed


% Begin Title Page
  %% Color Version
  \begin{tikzpicture}[overlay, remember picture, text=white, align=center]
    \fill [fill=MyBlue] (current page.south west) rectangle (\paperwidth,\paperheight);
    \node at (.5\linewidth,-2.125) {\includegraphics[width=1.5in]{logo-color}};
    \draw [color=white](p) -- (q);
  %% Monochrome Version
    \begin{tikzpicture}[overlay, remember picture, text=black, align=center]
      \fill [fill=white] (current page.south west) rectangle (\paperwidth,\paperheight);
      \node at (.5\linewidth,-2.125) {\includegraphics[width=1.5in]{logo-monochrome}};
      \draw (p) -- (q);
  %% Reset page color


In Acrobat, this displays on screen in color:


And will print in the monochrome:


By choosing the layers tab in the side bar (placement may vary depending on viewer; some older versions of viewers don't have support for layers at all), you can optionally switch to the monochrome view on screen as well:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .