[gl2ps] gl2ps/PDF

Micha Bieber krischnamurti at users.sourceforge.net
Mon May 18 12:10:11 CEST 2009


> I would like to do the same with PDF. Is there a way ? I guess I would
> need to retrieve the number of bytes gl2ps generated to have correct value
> at the end of my PDF file).

As far as I understand my old code :), this is not sufficient. I'm not
aware of a simple way to embed complete PDF structures in each other.
Aside from the mentioned corrected positions for the xref list, you have
very probably to introduce new dictionary entries, compelling you to
understand/modify the gl2ps numbering scheme for PDF dictionaries. The
possible compression step for PDF's will add a requirement, to do that
at the right time during processing. Also, PDF output is tailored for a
single page. In any case you have to intercept (more than once, I'm
afraid) and to modify the defined processing schedule for PDF's in gl2ps
and to modify your own code or the other way around (AFAICS).

Not really an easy task, I'm afraid. Looks like 'cog programming' to me.
You have to connect two different code sources without a chance for
significantly modularizing things. I don't know, if newer PDF versions
can help (gl2ps produces 1.4 output).

Sorry for this, but maybe others have better ideas
Micha  
--