[NTG-pdftex] JBIG2 Stuff

Hartmut Henkel hartmut_henkel@gmx.de
Wed, 8 Jan 2003 00:56:03 +0100 (CET)

Hi pdfTeX fans,

this is to announce that there is a rewrite of my fun-project JBIG2
pdfTeX driver, see www.circuitwizard.de, if you like. It now slowly
starts getting structured and working on multiple images from given
JBIG2 files. The driver marks only the page0 segments for putting into a
JBIG2Globals object, which are actually referenced by the used JBIG2
images; this shall minimize PDF file size. Hope such approach is

The JBIG2 driver is planned to do autonomously all of its bookkeeping
about JBIG2 files and their images and segments, to keep the pdfTeX
interface simple (it currently forgets to xfree anything, sorry :-)

You can now request two JBIG2 images by e. g.:

\pdfximage width \hsize page 1 {foo-multi.jb2}
\pdfximage width \hsize page 3 {foo-multi.jb2}

The driver (recursively) marks only the page0 segments required for
these images and---if page0 segments exist---reserves one JBIG2Globals
PDF object per file (straight-forward to Adobe's JBIG2Globals spec.).

Now, at the end of the pdfTeX run, I have the problem that I'm sitting
on top of a bunch of such page0 segments, and don't know how to get rid
of them. I cannot write e. g. \pdfximage page 0 {jbig2-multi.jb2} to
flush any accumulated page0 info from that file only, as this creates a
new PDF image object, which is not the wanted thing.

What I would need is a single function call from the pdfTeX side to a
function (which I can provide) to flush all page0 segments of any JBIG2
file accessed during the pdfTeX run into corresponding JBIG2Globals
objects, right before the PDF file is finalized.

That's my main problem here, so to say: I'm stymied. Any advice greatly

Best Regards