Summary: | /configurationerror in --setpagedevice-- | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Ralph Giles <ralph.giles> |
Component: | PDF Interpreter | Assignee: | Alex Cherepanov <alex> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 8.51 | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | 384 | Word Size: | --- |
Attachments: |
patch
patch 2 patch |
Description
Ralph Giles
2006-06-07 23:00:28 UTC
Created attachment 2264 [details]
199635.pdf
Object 37 specifies:
<<
/Contents 38 0 R
/MediaBox [0 0 609 0]
/Parent 2 0 R
/Resources <<
/XObject <<
/page37 39 0 R
>>
Thus there error is expected. The question is "What should we do with the bad
media box?"
Using Acrobat 6.0, there is a strange very thin page between pages 11 and 13.
IMHO anything is better than the PS error. I see 3 possible solutions. 1. Skip the invalid page -> There may be issues with page numbers 2. s/0/1/ -> easy to code and works as good as Acrobat 3. Try to guess the page size, for instance, use the predominant page size in the file. Since this is a broken PDF, I think that setting a MediaBox size of 0 to 1 is reasonable since it works as well as Acrobat (your choice #2). A pdfformaterror '**** Warning:' seems appropriate as well. Created attachment 2281 [details]
patch
Replace empty MediaBox or CropBox box with 1 point box and issue a warning.
DIFFERENCES:
Testing now.
The patch has an obvious typo in "PDFD EBUG" but this branch is not tested by the regression test. The patch also causes differences in the order of resource enumeration, Type1C font streams, and a puzzling differences PDF, generated from 136-01.ps @@ -347,7 +347,7 @@ endobj 53 0 obj <</Type/Encoding/BaseEncoding/WinAnsiEncoding/Differences[ -65/junk +134/junk 201/~201]>> endobj 37 0 obj Somehow, there's no other differenceswhich is hard to explain, unless /junk glyph is not used in the content stream. There's no raster differences. Created attachment 2320 [details] patch 2 Replace empty MediaBox or CropBox box with 1 point box and issue a warning. DIFFERENCES: Testing now. This patch can be applied after the patch for the bug 688771. There's no significant differences. Insignificant differences are: 409-01.ps - different order of file enumeration reflected in the raster 215-01.ps - different order of file enumeration in stdout only Bug687615.ps - different order of dictionary enumeration in stdout only. Multiple differences in generated PDF files in Type1C streams. Are you sure that comment #4 is correct ? It looks same as for bug 688688, and I wonder why so. In any case Ray should review the patch. Given the change we made for 688771, I think we should issue the warning, but use the PageSize as we did for 688771. Please comment and if you agree, and the change to use PageSize is not too ugly, please revise the patch and warning. Created attachment 2331 [details]
patch
Replace empty MediaBox or CropBox box with a box that is equal to the
current page size.
This patch is the same as the previous patch, except fix_empty_rect_elems
procedure.
Thank you for the revised patch. Please commit it. The patch is committed as revision 6897. |