[XeTeX] Generating cropped PDF graphics file

R (Chandra) Chandrasekhar chandra at ee.uwa.edu.au
Wed Apr 16 09:47:28 CEST 2008


Ross Moore wrote:
> You can \shipout just a box containing the contents that you want.
> 
> For example, here's how you can do it with  pdfTeX
> adding a frame for good measure.
> 
> %  put this in the preamble
> \usepackage{graphicx}
> \newbox\shipoutbox
> 
> 
> %
> %  wrap your content like this:
> %
> \setbox\shipoutbox=\hbox{%
>     % <-----  put your contents here !!!
> }%
> \setbox0=\vbox{\kern-1truein
>    \hbox{\kern-1truein
>      \framebox{\box\shipoutbox}%  you don't really need the frame
>    \kern1 truein}%
>   \kern1truein}%
>   \dimen0\ht0 \advance\dimen0\dp0
>   \pdfpageheight\dimen0
>   \pdfpagewidth\wd0
>   \shipout\box0
> 
> Similar coding should work with XeTeX as it also
> uses  \pdfpageheight  and  \pdfpagewidth .

Thanks, Ross. I have now used \newbox, \sbox, and \usebox in XeLaTeX for the 
logo text. But I have not been able to use the above commands starting with 
\setbox with XeLaTeX to get the desired output. Is there a LaTeX/XeLaTeX 
equivalent for these commands?

Chandra
16 Apr 08


More information about the XeTeX mailing list