[DVIPDFMx] supporting trimbox, &c. when making a .pdf

Alexander Grahn A.Grahn at fzd.de
Wed Jul 30 21:08:38 KST 2008


On Wed, Jul 30, 2008 at 01:54:03PM +0200, Alexander Grahn wrote:
>You are right, it doesn't seem to work for your one-page example. But
>for a two-page document it works:
>
>\begin{document}
>Test
>\newpage
>Test
>\end{document}
>
>There is a /TrimBox [...] entry in every Page object.

Not quite, sorry. /AtBeginShipout seems to forget the first page.

An explicit \special{...} right before \begin{document} does the trick:

\documentclass{minimal}

\usepackage[paperwidth=630bp,paperheight=810bp]{geometry}

\usepackage{atbegshi}
\AtBeginShipout{\special{pdf: put @thispage <</TrimBox [9.0 9.0 621.0 801.0]>>}}

\pagestyle{empty}

\special{pdf: put @thispage <</TrimBox [9.0 9.0 621.0 801.0]>>}
\begin{document}
Test
\newpage
Test
\end{document}


Alexander



More information about the dvipdfmx mailing list