[XeTeX] analogues of \pdfobj?

Heiko Oberdiek heiko.oberdiek at googlemail.com
Tue Aug 30 13:03:59 CEST 2011


On Tue, Aug 30, 2011 at 12:19:51PM +0200, Oleg Parashchenko wrote:

> Hello again,
> 
> On Fri, 26 Aug 2011 12:32:14 +0200
> Heiko Oberdiek <heiko.oberdiek at googlemail.com>
> wrote:
> 
> ...
> > * \pdfobj useobjnum/pdfobj: Objects can be constructed by
> >     \special{pdf:object ...}
> >     \special{pdf:put ...}
> >     \special{pdf:close ...}
> >     \special{pdf:stream ...} (dvipdfmx)
> >     \special{pdf:fstream ...} (dvipdfmx)
> 
> My idea was to implement one-pass "part K of N" functionality for
> multipage tables. With pdftex it is easy, at least the test code works:
> 
> %%%
> \pdfobj reserveobjnum {}
> \mathchardef\num\pdflastobj
> 
> \edef\ppp{\noexpand\pdfliteral{BT [\the\pdflastobj\space 0 R]TJ ET}}
> \def\para{Counter++. The final value is \ppp\par}
> 
> \para
> \para
> 
> \immediate\pdfobj useobjnum\num {(test)}
> %%%

And you need code for:
* that ensures, that the used glyphs are made known for pdfTeX,
  otherwise glyphs might be missing;
* that ensures, that the right font is active;
* that takes care of coordinate synchronization between
  pdfTeX's coordinate system and the user code at PDF level.

> Thanks to your suggestions, I thought that I could make a similar trick
> with DVIPDFMx,

\pdfliteral is available as \special{pdf:content ...},
\special{pdf:literal direct ...} and \special{pdf:code ...}.

Yours sincerely
  Heiko Oberdiek


More information about the XeTeX mailing list