# [pdftex] Some problems with form Xobjects and \pdfliteral

Paweł Jackowski P.Jackowski at gust.org.pl
Thu May 21 15:17:26 CEST 2009

> So even if I can get the name of the object with \pdfxformname, I still
> must call \pdfrefxform in order to get the name defined. So I still have
> my labels drawn somewhere else on the page.

% You can wrap every bitmap image with XForm

\immediate\pdfximage{image.jpg}
\setbox0=\hbox{\pdfrefximage\pdflastximage}
\immediate\pdfxform0

% then you can put all XForms using \pdfliteral only

\pdfliteral{
/Fm\pdfxformname\pdflastxform \space Do
}

% since you don't use \pdfrefx* commands at top page level,
% you can make your own XObject dict, because pdfTeX will not
% generate one anyway

\pdfpageresources{
/XObject <<
/Fm\pdfxformname\pdflastxform \space
\the\pdflastxform\space 0 R
>>}

\end

Is that what you need?
--
Pawe/l Jackowski
P.Jackowski at gust.org.pl