4

This is more a printer problem, but I have no way to solve it on the printer side.

When printing a two sided document, the sides do not match vertically. That means for example the line of \pagestyle{fancy} is not continuous from the left to the right page but shifted by 2 mm (0.08 inches). Is there a way take this into account when generating the file?

\addtolength{\voffset}{-2mm} shifts all pages, not only the e.g. odd ones.

\documentclass{book}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}

\usepackage[a4paper]{geometry}
\addtolength{\voffset}{-2mm}

\begin{document}

\lipsum

\end{document}
  • 1
    Did you look at this question? tex.stackexchange.com/questions/79568/… – egreg Oct 30 '12 at 12:34
  • @egreg: yes, but it is definitely a problem on the printer side. It happens to all prints; not only PDF's. I think it is a general problem of printers when they turn the page. – jens_bo Oct 30 '12 at 14:01
  • Indeed it can be. It was something to attempt, though. – egreg Oct 30 '12 at 17:06
7

For example, the page can be shifted by moving the output box right before the page is shipped out:

\documentclass{book}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}

\usepackage[a4paper]{geometry}

\usepackage{atbegshi}
\AtBeginShipout{%
  \ifodd\value{page}%
    \edef\mytemp{%
      \ht\AtBeginShipoutBox=\the\ht\AtBeginShipoutBox\relax
      \dp\AtBeginShipoutBox=\the\dp\AtBeginShipoutBox\relax
    }%
    \sbox\AtBeginShipoutBox{%
      \raisebox{-1in}{\usebox\AtBeginShipoutBox}%
    }%
    \mytemp
  \fi
}

\begin{document}

\lipsum

\end{document}

Result

In case of pdfTeX in PDF mode, alternatively \pdfvorigin could be changed inside \AtBeginShipout.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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