Bug 693247 - pdfopt problem caused by change of pdf_base.ps (commit on 3 Oct 2011)
Summary: pdfopt problem caused by change of pdf_base.ps (commit on 3 Oct 2011)
Status: RESOLVED DUPLICATE of bug 693044
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 9.05
Hardware: PC Linux
: P4 major
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 21:03 UTC by Thomas Dreibholz
Modified: 2014-02-17 04:46 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Dreibholz 2012-08-02 21:03:30 UTC
I have just noticed a problem caused by the change on 3 Oct 2011, which 
prevents pdfopt from linearizing pdflatex-generated files at least under Ubuntu 
12.04:

How to reproduce the problem:

ghostscript/9.05 is used by Ubuntu 12.04. Linearizing a pdflatex-generated file 
does not work here. For test, simply /usr/share/doc/texlive-
doc/latex/curve/curve.pdf can be used with pdfopt:

dreibh@lupo:/tmp$ pdfopt /usr/share/doc/texlive-doc/latex/curve/curve.pdf 
x.pdf
   **** Considering object with an invalid number 264 as null.
   **** Considering object with an invalid number 265 as null.
   **** Considering object with an invalid number 264 as null.
   **** Considering object with an invalid number 265 as null.
dreibh@lupo:/tmp$ pdfinfo x.pdf 
Producer:       ESP Ghostscript 815.03
CreationDate:   Mon Feb 25 18:03:04 2008
ModDate:        Mon Feb 25 18:03:04 2008
Tagged:         no
Pages:          26
Encrypted:      no
Page size:      595 x 842 pts (A4)
File size:      184754 bytes
Optimized:      no    ########### <<-- not linearized
PDF version:    1.3


I have therefore reverted the change (of commit on 3 Oct 2011) in pdf_base.ps:
-  1 index 0 lt {
-    (   **** Considering object with a negative number as null.\n) 
pdfformaterror
+  1 index dup 0 lt exch NumObjects ge or {
+    (   **** Considering object with an invalid number ) 
+    2 index 20 string cvs concatstrings   
+    ( as null.\n) concatstrings pdfformaterror


Now, pdfopt works as before:

dreibh@lupo:/tmp$ pdfopt /usr/share/doc/texlive-pictures-
doc/latex/curve/curve.pdf y.pdf
dreibh@lupo:~/tmp$ pdfinfo y.pdf 
Producer:       ESP Ghostscript 815.03
CreationDate:   Mon Feb 25 18:03:04 2008
ModDate:        Mon Feb 25 18:03:04 2008
Tagged:         no
Pages:          26
Encrypted:      no
Page size:      595 x 842 pts (A4)
File size:      185577 bytes
Optimized:      yes    ########### <<-- not linearized
PDF version:    1.3
Comment 1 Ken Sharp 2012-08-03 06:54:54 UTC
This is a duplicate of bug #693044 which is already fixed.

*** This bug has been marked as a duplicate of bug 693044 ***