pdf2ps seems to get bounding box wrong

Bug #1035667 reported by Gerv on 2012-08-11
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Medium
ghostscript (Ubuntu)
High
Till Kamppeter

Bug Description

(Using Ubuntu Precise 12.04 LTS on a Thinkpad X220)

The attached PDF, when viewed in evince, says in the Properties:

Paper Size: 496x437mm

That is correct.

When I convert it to PS using:

pdf2ps frame_base.pdf

and then view the PS file in a text editor, it says at the start:

%%BoundingBox: 0 0 595 842

I believe this is measured in points, where 1cm is 28 points, so this translates to 212mm x 301mm. Which is not the same.

This is a problem because the "poster" program uses this info to try and work out how best to split it up into sheets for a poster, and one gets very weird results. I tried reporting this bug at bugs.ghostscript.com and their tracker said that if I got the ghostscript from Ubuntu, I should report it to you first.

Gerv
---
ApportVersion: 2.0.1-0ubuntu11
Architecture: i386
DistroRelease: Ubuntu 12.04
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release i386 (20120423)
Lpstat:
 device for Canon-MP530: usb://Canon/MP530?serial=21F6EE&interface=1
 device for ML-2855: usb://Samsung/ML-2855%20Series?serial=Z2MFBKES901707Y
 device for Officejet-5600-series: hp:/usb/Officejet_5600_series?serial=CN6BND70Z904B2
 device for Officejet-5600-series-Fax: hpfax:/usb/Officejet_5600_series?serial=CN6BND70Z904B2
MachineType: LENOVO 4287CTO
Package: ghostscript 9.05~dfsg-0ubuntu4.1
PackageArchitecture: i386
Papersize: a4
PpdFiles:
 Canon-MP530: Canon PIXMA MP530 - CUPS+Gutenprint v5.2.8-pre1
 Officejet-5600-series: HP Officejet 5600 Series, hpcups 3.12.2
 ML-2855: Samsung ML-2851ND Foomatic/Postscript (recommended)
 Officejet-5600-series-Fax: HP Fax hpcups
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-27-generic-pae root=UUID=ccfdd2a5-39c3-4c9f-bd3c-ccf54bcbe085 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic-pae 3.2.21
Tags: precise running-unity
Uname: Linux 3.2.0-27-generic-pae i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo www-data
dmi.bios.date: 10/18/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 8DET54WW (1.24 )
dmi.board.asset.tag: Not Available
dmi.board.name: 4287CTO
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:bvr8DET54WW(1.24):bd10/18/2011:svnLENOVO:pn4287CTO:pvrThinkPadX220:rvnLENOVO:rn4287CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 4287CTO
dmi.product.version: ThinkPad X220
dmi.sys.vendor: LENOVO

Gerv (gerv-launchpad) wrote :
Logan Rosen (logan) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 1035667
When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in ghostscript (Ubuntu):
status: New → Incomplete

apport information

tags: added: apport-collected precise running-unity
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Changed in ghostscript (Ubuntu):
status: Incomplete → New
Gerv (gerv-launchpad) wrote :

OK, what now? :-)

Gerv

Gerv (gerv-launchpad) wrote :

I'd like to get this sent upstream. What's the procedure for that?

Gerv

Joe Mooring (toomanypets) wrote :

I tested your file with Ghostscript 9.06. The results are different, but still incorrect:
%%BoundingBox: 0 0 1405 0

This line should read:
%%BoundingBox: 0 0 1406 1239

You might try the "pdftops" Poppler utility instead. This utility provides the correct bounding box information in the header, though I can't vouch for image quality/integrity due to lack of experience with this tool.

Test to see if installed:
$ pdftops -v

To install:
$ sudo apt-get install poppler-utils

Gerv (gerv-launchpad) wrote :

toomanypets: thank you for taking the time to look at this bug. pdftops does indeed seem to work. But can this bug be passed upstream to the GhostScript developers?

Gerv

Joe Mooring (toomanypets) wrote :

Gerv: yes, this should be passed upstream, but I'm not the right person to do so.

Gerv usually there are really friendly folks arround in #ghostscript on irc.freenode.net...

Gerv (gerv-launchpad) wrote :

This is now fixed upstream due to a bug I filed:
http://bugs.ghostscript.com/show_bug.cgi?id=693293

Gerv

Changed in gs-gpl:
importance: Unknown → Medium
status: Unknown → Fix Released

Fixed Ghostscript package committed to quantal-proposed.

Changed in ghostscript (Ubuntu):
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Till Kamppeter (till-kamppeter)
milestone: none → ubuntu-12.10
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.06~dfsg-0ubuntu4

---------------
ghostscript (9.06~dfsg-0ubuntu4) quantal-proposed; urgency=low

  * debian/patches/020121012-bfae0b9-fix-bounding-box.patch: Fixed
    BoundingBox entry generation (LP: #1035667, Upstream bug #693293).
 -- Till Kamppeter <email address hidden> Fri, 12 Oct 2012 12:03:27 +0200

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

Other bug subscribers

Remote bug watches

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