New gs breaks ps-to-pdf bounding box convertion

Bug #42944 reported by Gustavo Carneiro on 2006-05-04
20
Affects Status Importance Assigned to Milestone
GS-GPL
Won't Fix
Medium
ImageMagick
New
Undecided
Unassigned
ghostscript (Ubuntu)
Medium
Unassigned
imagemagick (Debian)
Fix Released
Unknown
imagemagick (Ubuntu)
Undecided
Unassigned

Bug Description

I found a bug similar to bug #33255 where when I convert an eps file to pdf produces an error in the bounding box in the pdf file when converted in ubuntu dapper, but works fine in ubuntu breezy.

This is the original eps file.

eps file converted to pdf in ubuntu dapper, using epstopdf; notice that the bounding box is incorrect (it clips the figure to the left and top)

eps figure converted to pdf in ubuntu breezy; bounding box is converted correctly

Patrice Vetsel (vetsel-patrice) wrote :

Have you :
gs-esp 8.15.2.dfsg.0ubuntu1-0ubuntu1
?

Changed in gs-gpl:
status: Unconfirmed → Needs Info
Patrice Vetsel (vetsel-patrice) wrote :

I suspect similar bug than Bug #35674

Gustavo Carneiro (gjc) wrote :

I have 8.15.2.dfsg.0ubuntu1-0ubuntu1. My dapper system is up-to-date. And that version is still buggy for me (you're welcome to try converting the eps file yourself).

Alex (gsasha) wrote :

I have a workaround for this bug. I run "ps2epsi" on the file. This prints the error message, but produces the output epsi file. Then, I run "ps2epsi" on the resulting .epsi - and this time, the file, with extension .epsi.epsi, appears to be OK (if large...). So I just rename it back to ".eps" and use it.

It's ugly, I know, but at least gives the output...

Micah Cowan (micahcowan) wrote :

Removing Needs Info status, moving to gs-esp, as according to the comments it appears more appropriate, unless I misunderstand.

Changed in gs-gpl:
status: Needs Info → Confirmed
Till Kamppeter (till-kamppeter) wrote :

Due to change of Artifex' license policy to do the head development of Ghostscript under GPL and the merger of the extra functionality of ESP Ghostscript (ESP Ghostscript is discontinued now), the packages gs-esp and gs-afpl got obsolete. They are both replaced by gs-gpl, version 8.60 or newer. I have already done a first test package:

For Gutsy download all packages from

http://www.linux-foundation.org/~till/tmp/ubuntu/gutsy/gs-gpl/binary/

and do

sudo dpkg -i *gs-esp*.deb *gs-afpl*.deb *gs-gpl*.deb

to replace your ESP and AFPL Ghostscript by the new merged GPL Ghostscript.

If you are running Feisty or older download the files from

http://www.openprinting.org/download/printing/esp-gpl-ghostscript-merge/

into the same directory. Then do

sudo apt-get install build-essential
sudo apt-get build-dep gs-esp gs-gpl
dpkg-source -x gs-gpl_8.60.dfsg.1-0ubuntu1.dsc
cd gs-gpl-8.60.dfsg.1
dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i *gs-esp*.deb *gs-afpl*.deb *gs-gpl*.deb

Answer every question which appears with "y", so that all needed packages get installed.

Or try the distribution-independent binary package from

http://www.openprinting.org/download/printing/esp-gpl-ghostscript-merge/README

The new grand unified GPL Ghostscript will make it into Ubuntu soon, after

- Agreeing on the name with Debian: "gs-gpl" or simply "gs"
- Adding the C header files to libgs-gpl-dev
- Fixing upstream bug 689237: http://bugs.ghostscript.com/show_bug.cgi?id=689237

Please tell us your results with the test packages.

Changed in gs-esp:
status: Confirmed → Needs Info

I have uploaded new test packages (after working out a common concept with Debian's Ghostscript maintainer):

For Gutsy download all packages from

http://www.linux-foundation.org/~till/tmp/ubuntu/gutsy/ghostscript/binary/

and do

sudo dpkg -i *gs-esp*.deb *gs-afpl*.deb *gs-gpl*.deb *libgs*.deb *ghostscript*.deb

to replace your ESP and/or AFPL Ghostscript by the new merged GPL Ghostscript.

If you are running Feisty or older download the files from

http://www.linux-foundation.org/~till/tmp/ubuntu/gutsy/ghostscript/

into the same directory. Then do

sudo apt-get install build-essential
sudo apt-get build-dep gs-esp gs-gpl
dpkg-source -x ghostscript_8.60.dfsg.1-0ubuntu1.dsc
cd ghostscript-8.60.dfsg.1
dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i *gs-esp*.deb *gs-afpl*.deb *gs-gpl*.deb *libgs*.deb *ghostscript*.deb

Answer every question which appears with "y", so that all needed packages get installed.

Please tell us your results with the test packages.

Reproducable also with current GPL Ghostscript 8.60, reported upstream:

http://bugs.ghostscript.com/show_bug.cgi?id=689308

Changed in ghostscript:
status: Incomplete → Confirmed
Changed in gs-gpl:
status: Unknown → Confirmed

The solution is to use the "-dEPSCrop" Ghostscript option:

ps2pdf -dEPSCrop sim02-detail-zoomed.eps

This option will be set by default in GPL Ghostscript 8.60 (see patch in the upstream bug report).

Johan Christiansen (johandc) wrote :

I can confirm this is fixed in Ghostscript 8.61 in hady.

However, imagemagick still uses GS directly without the -dEPSCrop option, so this bug still exists in imagemagick.

Daniel T Chen (crimsun) on 2008-09-12
Changed in ghostscript:
status: Confirmed → Fix Released

Confirmed for converting to pdf but not to png. Forwarded upstream

Changed in imagemagick (Ubuntu):
status: New → Fix Committed
status: Fix Committed → In Progress
Changed in gs-gpl:
status: Confirmed → Won't Fix
Changed in gs-gpl:
importance: Unknown → Medium
Changed in imagemagick (Ubuntu):
status: In Progress → Fix Released
Changed in imagemagick (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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