[XeTeX] Synching PDF paper size with typesetting size

Karljurgen Feuerherm kfeuerherm at wlu.ca
Mon Nov 7 14:07:17 CET 2011


Thanks--I'll keep this on file!

K

>>> On Mon, Nov 7, 2011 at  7:43 AM, in message
<502AF2C0-E9FE-4CA8-98F2-28E0377067FC at frycomm.com>, William Adams
<will.adams at frycomm.com> wrote:
> On Nov 5, 2011, at 5:14 PM, Karljurgen Feuerherm wrote:
>
>> It is true, of course, that one may *not* want B5 pdf when the page
is
>> B5 (say to allow for trim), so forcing the two to be identical
wouldn't
>> be the thing to do either...
>
> Correct.
>
> I've posted code for handling this here --- you also need to put in a
special
> to get the crop, trim and bleed boxes correct.
>
> something like:
>
> \documentclass[showtrims,10pt]{memoir}
>
> \usepackage[xetex]{color}
> \usepackage{fixltx2e}
> \usepackage[xetex]{graphicx}
> \usepackage{xltxtra}
> \usepackage{fontspec}
> \usepackage{xunicode}
> \usepackage{ifthen}
>
> %170mm x 240mm. I must have these margins: top: 25mm, bottom: 30mm;
> %outside: 25mm; inside: 25mm.
>
> \setstocksize{752.315bp}{553.89bp}
> %\stockheight \stockwidth
> %\settrimmedsize{240mm}{170mm}{*}
> \settrimmedsize{680.304bp}{481.882bp}{*}
> %converted to BP 'cause using mm made Acrobat 8 report an error
> %\paperheight \paperwidth
> \settrims{36bp}{36bp}
> %\trimtop \trimedge
> %\setxlvchars[]
> %\settypeblocksize{17\onelineskip}{.75\xlvchars}{*}
> \settypeblocksize{524.41bp}{340.158bp}{*}
> %top form, first argument is preferred version ---
> %figure out your typesize leading and set the proper number of lines
> %\textheight \textwidth
> \setlrmargins{70.865bp}{*}{1}
> %\spinemargin \foremargin
> \setulmargins{70.865bp}{*}{1.2}%25mm * 1.2 == 30mm
> %\uppermargin \lowermargin
> \setheadfoot{1\onelineskip}{1\onelineskip}
> %\headheight \footskip
> \setheaderspaces{0bp}{*}{*}
> %\headdrop \headsep
> \setmarginnotes{1\onelineskip}{.125\xlvchars}{1\onelineskip}
> %\marginparsep \marginparwidth \marginparpush
>
> \checkandfixthelayout
>
> \quarkmarks
>
> \usepackage{atbegshi}
> \AtBeginShipout{\special{pdf: put @thispage <</TrimBox [36.0 36.0
517.9
> 716.3]>>}}
> \special{pdf: put @thispage <</TrimBox [36.0 36.0 517.9 716.3]>>}
>
> \begin{document}
> Test\clearpage Test
> \end{document}
> --
> William Adams
> senior graphic designer
> Fry Communications
> Sphinx of black quartz, judge my vow.
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex



More information about the XeTeX mailing list