New Forum | Previous | Next | (P-PDF) Developers
Topic: Adding PDF stream operators using pdfmark
Conf: (P-PDF) Developers, Msg: 51532
Date: 5/29/2002 04:46 PM
I've noticed what seems to be a weird limitation of the pdfmark operator, but I hope I'm wrong... I want to build the contents of a PDF stream (i.e. the "proper" stream part, not the dictionary part)belonging to a PDF form XObject, starting from an existing PDF stream, which is obviously written using PDF operators. In particular, I want to use the "Do" operator, which is PDF-specific as it requires the name of an XObject as the single operand, and XObjects are PDF-specific. Unfortunately, the only way I've found so far to specify explicitly the operators in a stream using pdfmark is to use the /BP and /EP pdfmarks. The problem is that these marks cause Distiller to expect the content to be expressed using PostScript operators, which are then translated into equivalent PDF operators. When I tried to use PDF operators Distiller complained because it didn't recognize the operators. The main problem is that the "Do" operator has no trivial counterpart in PostScript, as the most similar is "execform" but converting my procedure to use PostScript forms rather than PDF form XObjects is way too complex and probably I wouldn't anyway get the same result I want in the resulting PDF (one basic problem, for example, is that the name used with the "Do" operator is necessarily expressed in PDF form and not inside the stream itself, being listed in the "Resources" entry of the PDF stream dictionary of a PDF form XObject).
Is there a way to tell Distiller something as low-level as "after 'stream' write this and that in PDF and then write 'endstream'", without having to attempt the difficult exercise of converting the PDF stream content to PostScript and hope that Distiller will convert it back to PDF as I meant it to do? I hope that there's an answer to my question since there are many PDF operators that can not be translated straight away in PostScript.
Thanks a lot in advance.
Bye for now,