Bug 691454

Summary: MaxInlineImageSize values gt 8100 cause Adobe Reader error
Product: Ghostscript Reporter: Mark DeVries <mdevries>
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P4    
Version: 8.63   
Hardware: PC   
OS: Windows XP   
Customer: Word Size: ---
Attachments: PS file with embedded graphics

Description Mark DeVries 2010-07-12 13:02:00 UTC
Created attachment 6465 [details]
PS file with embedded graphics

Distill with the command: 
C:\PROGRA~1\gs\gs8.71\bin\gswin32 -dMaxInlineImageSize=8100 -sDEVICE=pdfwrite -sOutputFile=MAX8100.pdf -c .setpdfwrite -f MAX.ps

Any value of MaxInlineImageSize greater than 8100 causes Adobe Reader 9 error when reading PDF file.  Error message is:
"An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."
Display stops at first graphic.

Reported against gs 8.63 because that's the version we use; same behavior as 8.71.
Comment 1 Ken Sharp 2010-07-13 08:39:59 UTC
(In reply to comment #0)
> Created an attachment (id=6465) [details]
> PS file with embedded graphics
> 
> Distill with the command: 
> C:\PROGRA~1\gs\gs8.71\bin\gswin32 -dMaxInlineImageSize=8100 -sDEVICE=pdfwrite
> -sOutputFile=MAX8100.pdf -c .setpdfwrite -f MAX.ps
> 
> Any value of MaxInlineImageSize greater than 8100 causes Adobe Reader 9 error
> when reading PDF file.  Error message is:
> "An error exists on this page. Acrobat may not display the page correctly.
> Please contact the person who created the PDF document to correct the problem."
> Display stops at first graphic.

There is no defined limit for an inline image in the PDF specification. There is a recommendation that images should not exceed 4k but no defined limit. In addition there is no limit mentioned in Appendix H 'Compatibility and Implementation Notes'

Ghostscript defaults to a maximum of 4000 bytes, so is well within the empirically discovered limit.

The fact that Acrobat doesn't like inline images greater than 8100 bytes does not mean that other applications are not happy with this. Hobbling everyone with Acrobat's limits does not seem sensible.

Because Ghostscript defaults to an acceptable size the user must take specific action to create a file which Acrobat won't process, so I'm closing this as 'wontix' as to do so would limit the flexibility of other users.
Comment 2 Mark DeVries 2010-07-14 14:55:41 UTC
Understood.  Thanks for your analysis.  We will advise our customer accordingly.