[texhax] Not-for-print pages in LaTeX output

James Quirk jjq at galcit.caltech.edu
Mon Nov 5 12:38:39 CET 2007


On Mon, 5 Nov 2007, Dan Hatton wrote:

> On Sat, 3 Nov 2007, Martin Schröder wrote:
> 
> > Date: Sat, 3 Nov 2007 00:27:03 +0100
> 
> > 2007/11/2, Dan Hatton <vi5u0-texhax at yahoo.co.uk>:
> 
> > > Any idea what PDF viewers will respect the /PrintPageRange option?
> 
> > Try Adobe Reader.
> 
> Have now tried it in Adobe Reader 7.0.  Still, when I hit print, I get
> a dialogue box set to print all pages, instead of the subset selected
> with /PrintPageRange.  Any more ideas, please?

The PDF Reference lists /PrintPageRange as being introduced with PDF1.7 .
Therefore you will need to use something along the lines of the following:

\documentclass{article}
\pdfminorversion=7
\pdfcatalog {
   /ViewerPreferences <<
       /PrintPageRange [1 2]
   >>
}
\begin{document}
A
\newpage
B
\newpage
C
\end{document}


where \pdfminorversion=7 is used to get a %PDF-1.7 header.

With my setup, Linux/SuSE10.1, the above works with AR8.1.1 
but not with AR7.0.9 . Note the pages count from 0. Therefore
in the above example the print dialog will show the page range
as being 2-3.

James

> 
> 


More information about the texhax mailing list