Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: Adding PDF stream operators using pdfmark
Conf: (P-PDF) Developers, Msg: 51532
From: giova
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,


Giovanni Sarbia

Software Engineering
Netflow S.r.l.

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.