Previous | Next | (P-PDF) Developers
Topic: Why this file doesn't print correctly ?
Conf: (P-PDF) Developers, Msg: 31925
From: DanielAri
Date: 12/21/2001 06:13 AM
Whenever a file displays well but prints incorrectly, the immediate suspect is a missing /ProcSet. And your page does not have a /ProcSet, or even /Resources.
I also thought that maybe you had done something weird in the Widgets that you were using to draw the text. This was my second guess, but since it was easy to test, I tested it first. I used Acrobat to add a text widget to the page, and it printed incorrectly as well. This suggested that the problem was not in your Widgets, so that made it more certain that it was the missing /ProcSet.
I then manually added to the page dict:
/Resources << /ProcSet [ /PDF /Text /ImageC /ImageB /ImageI ] >>
This broke all of the object offsets, but as you know, Acrobat can usually fix this. For a test, it is OK.
I opened the file and printed it. It printed perfectly. Problem solved.
Look up ProcSet in the PDF spec and learn the difference between ImageC, ImageB, and ImageI. I used them all for a test, but for your software, you should only add the ones that are needed. Otherwise, you will slow printing down as Acrobat downloads unneccessary handling code.
Using a button widget for each line of text could cause problems. If all of your files will be like the sample file with one image and a few lines of text, then this works. If your files will have 50 lines of text per page and 50 pages, you are going to start getting into a giant number of Widgets and forms. All of those forms slow Acrobat down, and they take up space. Drawing the text in the /Contents stream of the page would make the file much smaller and faster.
Again, if your files will all be like the one you posted, then the difference is not a big deal. 1 x 1k is a tiny amount of space in a file. 50 x 50 x 1k starts to slow download times.
Regards,
Dan-Ari