Bug 690462 - pdfopt crashes when linearizing file
Summary: pdfopt crashes when linearizing file
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 8.64
Hardware: PC Linux
: P4 major
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-02 05:02 UTC by Pablo Rodríguez
Modified: 2012-09-28 12:17 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
samples.tar.bz2 - local copy of the sample files. (1.82 MB, application/octet-stream)
2009-06-07 11:08 UTC, Alex Cherepanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo Rodríguez 2009-05-02 05:02:59 UTC
Hi there,

pdfopt crashes when linearizing
http://ousia.justfree.com/Capitalism_3.0_Peter_Barnes-o.pdf.

Message error is the following:

Error: /undefined in --get--
Operand stack:
   --nostringval--   FirstPageXrefLength   1786738   --dict:647/720(L)--   648
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1862   1   3   %oparray_pop   1861
  1   3   %oparray_pop   1845   1   3   %oparray_pop   1739   1   3  
%oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--  
--nostringval--   --nostringval--   2   %stopped_push   --nostringval--  
--nostringval--   --nostringval--   --nostringval--   --nostringval--  
--nostringval--   649   1   648   --nostringval--   %for_pos_int_continue  
--nostringval--
Dictionary stack:
   --dict:1148/1684(ro)(G)--   --dict:1/20(G)--   --dict:108/200(L)--  
--dict:76/200(G)--   --dict:278/300(ro)(G)--   --dict:18/25(L)--   --dict:46/80(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 36516
GPL Ghostscript 8.64: Unrecoverable error, exit code 1

Just in case it helps, file was created with Multivalent Compress (using the
-compat option [http://multivalent.sourceforge.net/Tools/pdf/Compress.html]).

Thanks for your help,


Pablo
Comment 1 Pablo Rodríguez 2009-05-10 02:00:46 UTC
It crashes with http://www.archive.org/download/LawrenceLessigRemix/Remix-o.pdf:

Error: /undefined in --get--
Operand stack:
   --nostringval--   FirstPageXrefLength   4628770   --dict:915/1080(L)--   916
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1862   1   3   %oparray_pop   1861
  1   3   %oparray_pop   1845   1   3   %oparray_pop   1739   1   3  
%oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--  
--nostringval--   --nostringval--   2   %stopped_push   --nostringval--  
--nostringval--   --nostringval--   --nostringval--   --nostringval--  
--nostringval--   917   1   916   --nostringval--   %for_pos_int_continue  
--nostringval--
Dictionary stack:
   --dict:1148/1684(ro)(G)--   --dict:1/20(G)--   --dict:108/200(L)--  
--dict:76/200(G)--   --dict:278/300(ro)(G)--   --dict:18/25(L)--   --dict:46/80(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 36516
GPL Ghostscript 8.64: Unrecoverable error, exit code 1

Again, I used the -compat option with Multivalent compress to generate that file.

BTW, it doesn't happen with the original file
(http://www.bloomsburyacademic.com/pdf%20files/Remix.pdf).

Just in case it might help,


Pablo
Comment 2 Alex Cherepanov 2009-06-07 11:08:53 UTC
Created attachment 5075 [details]
samples.tar.bz2 - local copy of the sample files.

pdfopt is implemented in PostScript and is rather difficult to maintain.
Currently it doesn't support object streams or directory streams that have been
introduced in PDF 1.6. You can convert your files to PDF 1.4 using ps2pdf
script before using pdfopt at the cost of significant increase of the file
size.

Probably, pdfopt will be replaced with a similar utility based on muPDF library
or linearization option in pdfwrite device.
Comment 3 Ken Sharp 2012-09-28 12:17:09 UTC
Commit f2a40a3a7edd6d27caeaa19f7f644adf31ee972c adds a new 'FastWebView' switch
to pdfwrite which enables the production of 'Linearised' or 'optimised for fast web view' PDF files.

pdfopt.ps is now deprecated and no longer supported.