File: fixpdfmag.tex

package info (click to toggle)
texlive-extra 2018.20190227-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,308,212 kB
  • sloc: perl: 205,263; cs: 24,503; python: 21,587; java: 17,308; makefile: 14,921; ansic: 12,477; sh: 12,401; xml: 5,150; lisp: 1,708; csh: 1,129; ruby: 938; awk: 163; tcl: 142; cpp: 41; sed: 36; pascal: 25; haskell: 5
file content (36 lines) | stat: -rw-r--r-- 1,276 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
% fixpdfmag.tex
% Author: Javier Bezos, 2007
%
% This is Public Domain. You are free to use, copy, modify, 
% distribute or whatever you want without restrictions. It is
% unsupported, so please, do not contact the author, just
% modify the file.
%
% Unfortunately, pdftex  has changed recently its behaviour and
% now the page size is affected by \magnification, usually not a
% wanted effect. It has been proposed to modify Plain TeX when
% used with pdftex, by making a few changes in the pdftex.ini
% file, but many people do not know or simply do not want to
% modify Plain TeX or a custom made format. This file provides
% an alternative which requires to modify the documents, as
% the following example illustrates:
%
% \magnification3000
% \input fixpdfmag % <- after \magnification
% 
% Hello
% \bye
%
% If you are using a custom page size, it is preserved,
% as it just converts pt units to truept ones.

\ifx\pdfpageheight\undefined\else
  \begingroup
  \catcode`\@=11
  \global\pdfpageheight\expandafter\getf@ctor\the\pdfpageheight truept
  \global\pdfpagewidth\expandafter\getf@ctor\the\pdfpagewidth truept
  \global\pdfhorigin\expandafter\getf@ctor\the\pdfhorigin truept
  \global\pdfvorigin\expandafter\getf@ctor\the\pdfvorigin truept
  \endgroup
\fi
\endinput