Summary: | PDF Writer Creating multiple XObjects for Repeated Images | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Bob McClure <h8msft> |
Component: | PDF Writer | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 8.64 | ||
Hardware: | PC | ||
OS: | FreeBSD | ||
Customer: | Word Size: | --- |
Description
Bob McClure
2009-08-29 10:42:03 UTC
(In reply to comment #0) > Converting postscript with repetitive image calls, extremely large PDF files are > generated and extreme conversion times are experienced. After dumping the output > PDF if appears that ps2pdf is creating multiple XObjects per input EPS file. Realistically, its extremely hard for pdfwrite to know that two images presented separately are the same image. We would need to maintain a hash of every image presented so far, temporarily store each new image, hash it and compare the hash with every previous image in order to determine this. Frankly that would slow down 'normal' processing quite considerably, especially for people handling large images. While it would benefit your workflow, it would penalise everyone. Ideally the way to handle this is to construct the images as Form Resources in PostScript. You then use each Form as required. Because each form is unique there is no need to compare the images, and so a Distiller application can reuse the forms. Unfortunately at present pdfwrite does not properly honour PostScript forms, so this approach would not help you yet. We will be adding this functionality in the future (see #687561 and #691202) I believe you will find that Adobe Acrobat Distiller behaves in the same fashion with the workflow you describe, though in this case using forms *would* reduce the output size and processing time considerably, as Distiller is able to recognise forms. However we won't address the case where the same image is imply thrown through multiple times. |