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.

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}
share|improve this question
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. –  jenson_bo Oct 30 '12 at 14:01
    
Indeed it can be. It was something to attempt, though. –  egreg Oct 30 '12 at 17:06

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer

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.