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.

Is there a solution other than the one listed here? Which I quote:

Some current distributions of pdfTeX have a bug (feature?) that using \magnification rescales the paper along with the printing. The results can look very puzzling. This happens only with pdf output, not with dvi.

The reason is that the pdf dimensions relating to the paper size have been set in pt instead of truept. The cure is simple enough: after \magnification just insert something like this.

\pdfpagewidth=210.2truemm  \pdfpageheight=297.3truemm
% This is for A4 paper, use 8truein and 11truein for letter-size paper.
\pdfhorigin=1truein \pdfvorigin=1truein
\hsize=\pdfpagewidth  \advance\hsize by -2truein
\vsize=\pdfpageheight \advance\vsize by -2.1truein

There are some patches that will save you this trouble. Javier Bezos's fix is included in TeX Live. Ian Hutchinson offers another solution which is a small masterpiece of deviousness in itself. It needs to be read in full to be appreciated, but here is a sample, one worthy of any list of TeX Dirty Tricks.

\begingroup
\catcode`P=12 \catcode`T=12
\lowercase{\endgroup\def\convert@truept#1PT{#1truept}}
share|improve this question
    
Don't use \magnification with PDF. –  Martin Schröder May 27 '13 at 14:54
    
@MartinSchröder Should one use mag of the geometry package? –  Maesumi May 27 '13 at 17:14
add comment

1 Answer 1

up vote 2 down vote accepted

I can offer a variant of pdftexmagfix.tex that doesn't leave useless macros behind itself:

\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdfoutput\endcsname\relax\else
\catcode`@=11
\def\m@g{%
  \begingroup\lccode`?=`p \lccode`!=`t
  \lowercase{\def\pdfconvert@truept##1?!{##1truept}%
  \def\pdfmag@fix##1{##1=\expandafter\pdfconvert@truept\the##1\relax}}%
  \edef\x{\endgroup
    \mag\count@
    \pdfmag@fix\pdfhorigin   \pdfmag@fix\pdfvorigin
    \pdfmag@fix\pdfpagewidth \pdfmag@fix\pdfpageheight}\x
  \hsize6.5truein\vsize8.9truein\dimen\footins8truein}
\catcode`@=12
\fi

%%% The test
\magnification \magstep5
\hoffset -1 truein  \voffset -1 truein
\parindent 0pt  The top
\bye
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.