Bug 689321 - PDF file does not display
Summary: PDF file does not display
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: Default assignee
URL: http://www.cups.org/str.php?L1779
Keywords:
Depends on:
Blocks: 689315
  Show dependency tree
 
Reported: 2007-07-04 04:58 UTC by Till Kamppeter
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
PDF file which causes error (11.87 MB, application/pdf)
2007-07-04 05:52 UTC, Till Kamppeter
Details
Fix for displaying attached PDF (1.63 KB, patch)
2007-07-04 05:53 UTC, Till Kamppeter
Details | Diff
W8700H6349.jpg (9.55 MB, image/jpeg)
2007-07-04 09:35 UTC, Ray Johnston
Details
patch (438 bytes, patch)
2007-07-04 10:19 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Till Kamppeter 2007-07-04 04:58:42 UTC
The attached PDF file gives an error when trying to display with current
Ghostscript:

------------------------------------------------------------------------------till@till-laptop:~/ubuntu/oem-config/oem-config-1.8/d-i$
gs -sDEVICE=x11 ~/ghostscript/gpl/testfiles/Anne_DESCRIPTIF.pdf
GPL Ghostscript SVN PRE-RELEASE 8.60 (2007-05-12)
Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefined in obj
Operand stack:
   1   0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1889   1   3   %oparray_pop   1888
  1   3   %oparray_pop   1872   1   3   %oparray_pop   1755   1   3  
%oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--  
--nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1146/1684(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--
Current allocation mode is local
Current file position is 24
GPL Ghostscript SVN PRE-RELEASE 8.60: Unrecoverable error, exit code 1
till@till-laptop:~/ubuntu/oem-config/oem-config-1.8/d-i$ 
------------------------------------------------------------------------------
Comment 1 Till Kamppeter 2007-07-04 05:47:39 UTC
See also

http://www.cups.org/str.php?L1779

---------------------------------------------------------------------------------
I've got a PDF for which pdf2ps will failed.
This is preventing me from printing this PDF.
What's disturbing is the fact this bug was already reported and fixed, so this
is a regression.

[admin@info1 PB PDF]$ pdf2ps Anne_DESCRIPTIF.pdf

   **** Warning: File has insufficient data for an image.
Error: /typecheck in --closefile--
Operand stack:
   --dict:5/5(L)--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3  
%oparray_pop   1   3   %oparray_pop   --nostringval--   --nostringval--   2   1
15   --nostringval--   %for_pos_int_continue   --nostringval--  
--nostringval--   --nostringval--   --nostringval--   %array_continue  
--nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue 
--nostringval--   728763
Dictionary stack:
   --dict:1116/1686(ro)(G)--   --dict:0/20(G)--   --dict:85/200(L)--  
--dict:85/200(L)--   --dict:104/127(ro)(G)--   --dict:241/347(ro)(G)--  
--dict:20/24(L)--   --dict:4/6(L)--   --dict:20/20(L)--   --dict:1/1(ro)(G)--
Current allocation mode is local
Last OS error: 2
ESP Ghostscript 815.01: Unrecoverable error, exit code 1
---------------------------------------------------------------------------------

This is ths same file but not the same error.

Patch for this error attached.
Comment 2 Till Kamppeter 2007-07-04 05:52:33 UTC
Created attachment 3145 [details]
PDF file which causes error
Comment 3 Till Kamppeter 2007-07-04 05:53:51 UTC
Created attachment 3146 [details]
Fix for displaying attached PDF
Comment 4 Alex Cherepanov 2007-07-04 06:40:00 UTC
The patch that fixes error recovery from the errors in image processing
has been in the HEAD for a while. The question is why Ghostscript cannot
display the image but Acrobat can?
Comment 5 Ray Johnston 2007-07-04 09:35:14 UTC
Created attachment 3153 [details]
W8700H6349.jpg

Image that causes the problem. This can be displayed by other image viewers,
but not Ghostscript.

Test with:   gs lib/viewjpeg.ps -c "(W8700H6349.jpg) viewJPEG"

and it gets ioerror in image.
Comment 6 Alex Cherepanov 2007-07-04 10:19:09 UTC
Created attachment 3161 [details]
patch

Fix JPEG library configuration, which was set for 8086-style segmented model
and
limited the size of memory chunks to 64K.
Comment 7 Ray Johnston 2007-07-04 10:33:13 UTC
I had also been working on this and had committed the fix before I saw
Alex's.

I had assumed that since the 'who_owns_what' has me as owner for jpeg.dev,
I would fix it.

Fixed by svn rev 8099