[texhax] cleardoublepage causes an error in pdf files

Luca Turchetti luca.turchetti at uniroma1.it
Mon Jan 5 14:45:58 CET 2004

I'm using the fancyhdr package to format the page header.

My document is two-sided so, when chapters end on odd pages, a blank
page is generated by the \cleardoublepage command.

Since I don't want any header on those blank pages, i redefined the
\cleardoublepage command as suggested in the fancyhdr package
documentation, adding a \thispagestyle{empty} command:

\renewcommand\cleardoublepage{\clearpage\if at twoside \ifodd\c at page\else

\hbox{}\thispagestyle{empty}\newpage\if at twocolumn\hbox{}\newpage\fi\fi\fi}

After converting the .tex file to .pdf using dvips and then ps2pdf (no,
I cannot use pdftex to avoid passing through the .ps file) I display the
.pdf file with Acrobat Reader. Everything works fine except when I
display the blank pages generated by \cleardoublepage: in this case I
get the following error

"The page contents object has the wrong type"

Does anybody know how to fix this problem?
Thank you
Luca Turchetti

More information about the texhax mailing list