Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to add text 'This page intentionally left blank' to blank page (with header) but I would like to this text appear in pdf but not in the printed document. Is it even possible? If so, how?

share|improve this question
1  
You can add the text in a Optional Contents Group (OCG) layer with print state set to off. However, I don't think there is a package that can do this yet. You might be able to modify ocg.sty which is distributed with Asymptote. –  Martin Heller May 28 '12 at 19:21
add comment

2 Answers

The pdfcomment package allows you to add PDF annotations to the document which are usually not printed, except if explicitly requested. Looking at the manual I come up with this example which adds a white page behind the title page to make sure the next content is starting at an odd page.

\documentclass[twoside]{book}
\usepackage{blindtext}
\usepackage{xcolor}
\usepackage{pdfcomment}
\title{Test}\author{Tester}

% Not sure if this is right, but by default comments should not be printed anyway
%\pdfliteral{%
%    /printCommentPopups [/b false]
%}

\begin{document}
\maketitle
\clearpage
\pdffreetextcomment[subject={overlay},height=2.2cm,width=4.8cm,voffset=-2.8cm,hoffset=1.5cm,opacity=1.0,justification=right,type=typewriter,font=Jokerman,fontsize=13pt,fontcolor=black]
    {This page was left intensionally blank.}
\thispagestyle{empty}
\cleardoublepage

\blindtext

\end{document} 
share|improve this answer
add comment

This sort of thing is normally accomplished by adding a switch at the top of the preamble (See How to make a switch for print vs. display versions of a document with respect to links/URLs).

Personally I don't like "this page intentionally left blank pages". For starters once the sentence is typeset the page is not blank anymore and it really underestimates the intelligence of readers.

So, I would rather have an epigraph or epigraphs, but modify the code to suit:

\documentclass{book}
\usepackage{epigraph,lipsum}
\makeatletter
\newif\if@print
\@printtrue
\def\cleardoublepage{%
  \clearpage
  \if@twoside\ifodd\c@page\else
    \if@print
    \hbox{}
    \vspace*{\fill}
    \begin{center}
       \blankpagetext@cx      
    \end{center}
    \vspace{\fill}
    \fi
    \thispagestyle{empty}
    \newpage
    \if@twocolumn\hbox{}\newpage
    \fi
\fi\fi}
\def\blankpagetext@cx{\epigraph{We all agree that your theory is crazy. 
          But is it crazy enough?}{Niels Bohr}}

\begin{document}
\mainmatter
\chapter{Test}
\lipsum[1]
\chapter{Second}
\lipsum[2]
\end{document}

The switch is a simple \if@print.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.