Bug 688744 - /configurationerror in --setpagedevice--
Summary: /configurationerror in --setpagedevice--
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.51
Hardware: PC All
: P2 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-07 23:00 UTC by Ralph Giles
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 384
Word Size: ---


Attachments
patch (4.03 KB, patch)
2006-06-17 11:07 UTC, Alex Cherepanov
Details | Diff
patch 2 (3.27 KB, patch)
2006-07-01 20:34 UTC, Alex Cherepanov
Details | Diff
patch (3.24 KB, patch)
2006-07-05 17:59 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Giles 2006-06-07 23:00:28 UTC
Customer reports failure rendering file with the tiffg4 device. I've confirmed
with both 8.51 and HEAD.

AFPL Ghostscript SVN PRE-RELEASE 8.55 (2006-05-20)
Copyright (C) 2006 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 34.
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8
Page 9
Page 10
Page 11
Page 12
Error: /configurationerror in --setpagedevice--
Additional information: [/PageSize [609 0]]

Renders without complaint in Acrobat 7 and MacOS X Preview.
Comment 1 Ralph Giles 2006-06-07 23:01:25 UTC
Created attachment 2264 [details]
199635.pdf
Comment 2 Dan Coby 2006-06-08 00:50:15 UTC
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.
Comment 3 Alex Cherepanov 2006-06-12 20:19:31 UTC
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.
Comment 4 Ray Johnston 2006-06-12 21:23:28 UTC
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.
Comment 5 Alex Cherepanov 2006-06-17 11:07:15 UTC
Created attachment 2281 [details]
patch

Replace empty MediaBox or CropBox box with 1 point box and issue a warning.

DIFFERENCES:
Testing now.
Comment 6 Alex Cherepanov 2006-06-18 07:02:49 UTC
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.
Comment 7 Alex Cherepanov 2006-07-01 20:34:31 UTC
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.
Comment 8 Alex Cherepanov 2006-07-02 18:16:10 UTC
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.
Comment 9 leonardo 2006-07-05 14:17:12 UTC
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.

Comment 10 Ray Johnston 2006-07-05 15:09:02 UTC
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.
Comment 11 Alex Cherepanov 2006-07-05 17:59:03 UTC
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.
Comment 12 Ray Johnston 2006-07-05 22:20:25 UTC
Thank you for the revised patch. Please commit it.
Comment 13 Alex Cherepanov 2006-07-06 04:13:01 UTC
The patch is committed as revision 6897.