On Mon, 9 Dec 2002, Martin Schroeder wrote:
--- Or can one define a continuation stream in PDF? --- No.
Wouldn't something like /DecodeParms [<< /JBIG2Globals [6 0 R 7 0 R 8 0 R]>>] and then 6 0 obj << /Length 59 >> stream The stream part 1... (the dots make the length right :-) endstream 7 0 obj << /Length 97 >> stream The stream part 2... endstream 8 0 obj << /Length 42 >> stream The stream part 3... endstream work? (Which could be made recursive.) Never tried this.
But each image can have its own JBIG2Globals: "The stream _can_ be shared by multiple image XObjects whose JBIG2 encodings use the same global segments." (emph mine)
Yes, so it's done now; 3 pictures use 1 global. I would even emphasize _same_: Don't know whether my method of accumulated page 0 object is right. Now I read in the PDF ref. that when writing XObjects, their page number has to be reset to 1, but I haven't done this (it might be the reason for the Acroread crash, will test it). So the ordering of page association is taken out. Somehow a page object selects its page 0 objects not by any ordering, but by what it wants to do with it. I mean, if I include ALL pages 0, even the ones which came with later pages, e. g. the 1st page would not stumble over the later ones.
This would mean, that for writing an additional, later page (e. g. page 2), this page has to be accompanied also by its page 0 information---which is a waste of space in the PDF file, as part of the page 0 PDF info has been already written before.
This seems to be the only way. :-{
Then the conceptual beauty of the multi-page JBIG2 images would be spoilt.
How large is a typical page 0 information compared to the actual images?
There is exactly ONE multi-page JBIG2 file I have (got it from William Rucklidge, it's also in the JBIG2 standard). So it's ideal for statistics :-) Overall page 0 is 68 byte there, page 0 for page 1 is only 35 bytes. The page 1-3 streams have length 341, 271, 123. In THIS example there is no real advantage of having one page 0 for all pages. But who knows. They are always stating, that JBIG2 is advantageous particularily for multi-pages. (And that's where pdfTeX could do good work, e. g. take some good old fiction or math books without copyright, scan them, compress them with JBIG2, republish them online through pdfTeX.)
This sounds like a two-pass approach, which we can not do.
I don't know what pdfTeX can request on its interface, e. g. Gimme picture 1, pause, gimme picture 2, or can it give a data structure: Picture 1 AND 2 please? E. g. when one writes page 1-3. Greetings Hartmut