pdfopt problem caused by change of pdf_base.ps

Bug #1032366 reported by Thomas Dreibholz
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Medium
ghostscript (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Till Kamppeter

Bug Description

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:

[IMPACT]

pdfopt does not work on any file generated by pdflatex.

[TESTCASE]

Cited from the original reporter of this bug:

----------
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 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 ########### <<-- linearized
PDF version: 1.3
----------

After installing the proposed package this problem should disappear, getting

...
Optimized: yes
...

without needing to edit pdf_base.ps.

[Regression Potential]

Very low, as only a simple consistency check got removed by the patch, on the rendering nothing is changed.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ghostscript 9.05~dfsg-0ubuntu4.1
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
Uname: Linux 3.2.0-27-generic x86_64
ApportVersion: 2.0.1-0ubuntu11
Architecture: amd64
Date: Thu Aug 2 23:05:41 2012
InstallationMedia: Kubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120423)
Lpstat:
 device for Farblaser-TCP: socket://132.252.151.21:9100
 device for HP-LaserJet-2420: socket://132.252.151.20:9100
 device for HPLaserJet4050: socket://132.252.151.22:9100
 device for HPLaserJet5MP: socket://172.31.255.128:9100
 device for Knoll: lpd://192.168.200.144/
MachineType: LENOVO 4061W1N
Papersize: a4
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
PpdFiles:
 Knoll: Fiery X3eTY 50_45C-KM PS Color Server 1.01eu
 Farblaser-TCP: Dell MFP Laser 3115cn v3015.103 PS
 HPLaserJet4050: HP LaserJet 4050 Series Postscript (recommended)
 HP-LaserJet-2420: HP LaserJet 2420 Postscript (recommended)
 HPLaserJet5MP: HP LaserJet 5MP Postscript (recommended)
ProcEnviron:
 LANGUAGE=
 TERM=xterm
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-27-generic root=UUID=b0b8846c-fcfb-4cda-ba9c-600cb5ff36bf ro crashkernel=384M-2G:64M,2G-:128M quiet splash vt.handoff=7
SourcePackage: ghostscript
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/14/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 6FET92WW (3.22 )
dmi.board.name: 4061W1N
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6FET92WW(3.22):bd12/14/2011:svnLENOVO:pn4061W1N:pvrThinkPadW500:rvnLENOVO:rn4061W1N:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 4061W1N
dmi.product.version: ThinkPad W500
dmi.sys.vendor: LENOVO

Revision history for this message
Thomas Dreibholz (dreibh) wrote :
Revision history for this message
Thomas Dreibholz (dreibh) wrote :
Changed in ghostscript (Ubuntu):
status: New → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The problem is fixed upstream in Ghostscript 9.06 which we will ship in Quantal. For Precise we will have to make an SRU (Stable Release Update) with the patch of the upstream bug applied. It will take some days as we are in SRU freeze for the 12.04.1 release.

Changed in ghostscript (Ubuntu):
status: Confirmed → Fix Released
Changed in ghostscript (Ubuntu Precise):
status: New → Triaged
Changed in gs-gpl:
importance: Unknown → High
status: Unknown → Invalid
Changed in ghostscript (Ubuntu):
importance: Undecided → Medium
Changed in ghostscript (Ubuntu Precise):
importance: Undecided → Medium
assignee: nobody → Till Kamppeter (till-kamppeter)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded fixed package to precise-proposed. As soon as the package gets approved another comment with installation instructions will get posted here. Please test the package then and tell us here whether it fixes the bug for you. Only with your feedback we can make the package an official update.

To the SRU team: debdiff attached.

Changed in ghostscript (Ubuntu Precise):
milestone: none → precise-updates
description: updated
Changed in ghostscript (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

Hello Thomas, or anyone else affected,

Accepted into precise-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gs-gpl:
importance: High → Unknown
status: Invalid → Unknown
Changed in ghostscript (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in gs-gpl:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

Looks good:-

alan@deep-thought:~/Downloads$ pdfinfo howtoburncds.pdf
Creator: Writer
Producer: OpenOffice.org 1.1.1
CreationDate: Mon Mar 7 12:16:08 2005
Tagged: no
Pages: 6
Encrypted: no
Page size: 595 x 842 pts (A4)
File size: 292871 bytes
Optimized: no
PDF version: 1.4

alan@deep-thought:~/Downloads$ pdfopt howtoburncds.pdf howtoburncds_opt.pdf

alan@deep-thought:~/Downloads$ pdfinfo howtoburncds_opt.pdf
Creator: Writer
Producer: OpenOffice.org 1.1.1
CreationDate: Mon Mar 7 12:16:08 2005
Tagged: no
Pages: 6
Encrypted: no
Page size: 595 x 842 pts (A4)
File size: 293464 bytes
Optimized: yes
PDF version: 1.4

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.05~dfsg-0ubuntu4.2

---------------
ghostscript (9.05~dfsg-0ubuntu4.2) precise-proposed; urgency=low

  * debian/patches/020120828-535d11e-disable-checking-for-the-max-pdf-object-number-during-pdf-linearisation.patch:
    Disable checking for the max pdf object number during PDF linearisation,
    because linearisation adds a few new objects to the PDF file (LP: #1032366).
 -- Till Kamppeter <email address hidden> Tue, 28 Aug 2012 21:07:13 +0200

Changed in ghostscript (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.