[XeTeX] Writing binary data in \special

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Aug 11 19:39:24 CEST 2011


Hello,

I want to use \special with arbitrary binary data, e.g.:
  \special{pdf: object @my <</Hello/World>>streamXYZäFOOendstream}^1
However 8bit characters are recorded and written in UTF-8.

\XeTeXinputencoding bytes is only a very partial solution:
* It doesn't work without --etex
* "\XeTeXoutputencoding" is missing.

Is there a way to write arbitrary binary data in files
and \special commands? Or is this limited to 7bit or UTF-8?

Yours sincerely
  Heiko Oberdiek

^1 For the example the workaround would be using the
   filter ASCII85Decode (or ASCIIHexDecode). But that blows
   the stream contents and increases the final PDF file size.


More information about the XeTeX mailing list