[texhax] [pdftex] image XObjects in pdfTeX or XeTeX PDF output?

Alexander Grahn A.Grahn at fzd.de
Mon Nov 22 16:03:05 CET 2010

On Mon, Nov 22, 2010 at 07:53:44AM -0500, William Adams wrote:
>On Nov 19, 2010, at 3:30 PM, Ross Moore wrote:
>(re: an image included multiple times being included but once and thereafter referred to)
>> PdfTeX does this automatically for you.
>So does XeTeX.

This may work with inclusion of external graphics from files, with TeX
boxes it doesn't:

\setbox0=\hbox{Hello World!}\copy0\copy0\copy0

does not create a Form XObject to be inserted on every \copy0, at least
at my end.

The XeTeX syntax for creating Form XObjects is different from pdfTeX
(see the dvipdfm manual):



\savebox\mybox{\fbox{Hello world!}}


%distills \mybox into Form XObject for later reuse
\special{pdf:bxobj @myform
  width \strip at pt\wd\mybox pt
  height \strip at pt\ht\mybox pt
  depth \strip at pt\dp\mybox pt}%

%reuse of Form XObject
\special{pdf: uxobj @myform}
\special{pdf: uxobj @myform}
\special{pdf: uxobj @myform}



More information about the texhax mailing list