ps2pdf does not create proper hyperlinks

Bug #583990 reported by Brad Lucier on 2010-05-21
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Medium
ghostscript (Ubuntu)
Low
Unassigned
Lucid
Low
Unassigned

Bug Description

Binary package hint: ghostscript

Ubuntu Release:

> lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04

Package Version:

> apt-cache policy ghostscript
ghostscript:
  Installed: 8.71.dfsg.1-0ubuntu5.1
  Candidate: 8.71.dfsg.1-0ubuntu5.1
  Version table:
 *** 8.71.dfsg.1-0ubuntu5.1 0
        500 http://ubuntu.media.mit.edu/ubuntu/ lucid-updates/main Packages
        100 /var/lib/dpkg/status
     8.71.dfsg.1-0ubuntu5 0
        500 http://ubuntu.media.mit.edu/ubuntu/ lucid/main Packages

Expected to happen:

If you run

ps2pdf12 test-pdf.ps

on the file located at

http://www.math.purdue.edu/~lucier/launchpad/2/test-pdf.ps

then you get the file test-pdf.pdf located at

http://www.math.purdue.edu/~lucier/launchpad/2/test-pdf.pdf

that has one hyperlink on each page that should link to the other page. These hyperlinks don't work.

What happened instead:

I expected to get working hyperlinks, like in

http://www.math.purdue.edu/~lucier/launchpad/2/test-pdf2.pdf

which was produced from

http://www.math.purdue.edu/~lucier/launchpad/2/test-pdf2.ps

by

ps2pdf12 test-pdf2.ps

with

banach-131% gs
ESP Ghostscript 815.02 (2006-04-19)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.

The files test-pdf.ps and test-pdf2.ps are identical.

It used to work on 9.10. (I don't have any more 9.10 machines, unfortunately, I converted them all to 10.04 before I found this bug.)

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: ghostscript 8.71.dfsg.1-0ubuntu5.1
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
CupsErrorLog:

Date: Fri May 21 15:59:15 2010
Lpstat: device for HP-LaserJet-P2015-Series: hp:/net/HP_LaserJet_P2015_Series?zc=NPI97A8E7
MachineType: HP-Pavilion GG054AAR-ABA a6177c
Papersize: letter
PpdFiles: HP-LaserJet-P2015-Series: HP LaserJet P2015 Series Postscript (recommended)
ProcCmdLine: root=UUID=f3823897-e620-4868-a57c-74a44f88202b ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/usr/bin/tcsh
SourcePackage: ghostscript
dmi.bios.date: 08/16/2007
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 5.08
dmi.board.name: Berkeley
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr5.08:bd08/16/2007:svnHP-Pavilion:pnGG054AAR-ABAa6177c:pvr:rvnASUSTeKComputerINC.:rnBerkeley:rvr1.xx:cvnHewlett-Packard:ct3:cvrChassisVersion:
dmi.product.name: GG054AAR-ABA a6177c
dmi.sys.vendor: HP-Pavilion

Brad Lucier (lucier) wrote :
Changed in gs-gpl:
status: Unknown → Confirmed
Changed in gs-gpl:
status: Confirmed → Fix Released
Till Kamppeter (till-kamppeter) wrote :

Fix will get into Maverick as soon as the new Ghostscript gets packaged for Maverick.

Changed in ghostscript (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Brad Lucier (lucier) wrote :

Till:

I appreciate how you're interacting with the Ghostscript developers and shepherding bugs through their bug system and IRC channel. Thanks!

I disagree, however, with setting the importance of this bug to "low".

First, while I used ps2pdf12 as an example, it similarly doesn't work with ps2pdf13 or ps2pdf14.

More important is the following. I've been using Linux systems to produce a series of e-books, an example of which is at

http://www.trillia.com/zakon1.html

(search for "download the book"). If I use the version of ghostscript currently in 10.04 to produce the books, then none of the links work: not from the PDF table of contents in the sidebar, nor from the book's table of contents, nor from the index to the interior of the book, nor from references like "From Theorem 7 in Section 3". In short, there's almost no added value to producing an e-book in PDF without these links.

The IRC channel discussion seems to conclude that production steps I use for my books is the preferred way to produce PDF files for viewing on several platforms or with several viewers, but it doesn't work if this bug isn't fixed.

I interpret your preceding comment that the upstream bug fix likely won't get shipped until the 10.10 release time frame. Six months is a long time not to be able to produce hyperlinked documents in Ubuntu.

Brad

Till Kamppeter (till-kamppeter) wrote :

This will be fixed for sure in Maverick, but it is not decided yet whether Maverick will come with Ghostscript 9.0 (which gets released in August, before our Feature Freeze) or by applying a patch to Ghostscript 8.71. The problem is that GS 9.0 has a completely new color management architecture which can cause regressions and we can get a Maverick with very bad printing performance.

For issuing a Stable Release Update (SRU) for Lucid, we must apply the fix in Maverick first.

Changed in ghostscript (Ubuntu):
status: Triaged → In Progress
Changed in ghostscript (Ubuntu):
status: In Progress → Fix Committed
Changed in ghostscript (Ubuntu Lucid):
importance: Undecided → Low
status: New → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 8.71.dfsg.2-0ubuntu2

---------------
ghostscript (8.71.dfsg.2-0ubuntu2) maverick; urgency=low

  * debian/patches/ps2pdf-hyperlinks.dpatch: Let ps2pdf create proper hyperlinks
    (LP: #583990, upstream bug #691344).
 -- Till Kamppeter <email address hidden> Mon, 19 Jul 2010 19:15:20 +0200

Changed in ghostscript (Ubuntu):
status: Fix Committed → Fix Released
Till Kamppeter (till-kamppeter) wrote :

Uploaded SRU for Lucid to -proposed, waiting for approval. debdiff of the SRU attached.

Changed in ghostscript (Ubuntu Lucid):
status: Triaged → Fix Committed
Jonathan Riddell (jr) wrote :

Test case needed

Brad Lucier (lucier) wrote :

Is this what you mean? From the original bug report:

If you run

ps2pdf12 test-pdf.ps

on the file located at

http://www.math.purdue.edu/~lucier/launchpad/2/test-pdf.ps

then you get the file test-pdf.pdf located at

http://www.math.purdue.edu/~lucier/launchpad/2/test-pdf.pdf

that has one hyperlink on each page that should link to the other page. These hyperlinks don't work.

Note that we are currently in SRU freeze for 10.04.1. Therefore no official SRU testing will be possible for two weeks from now. To make the fixes available to you already now and to give you also the possibility to give us our testing period before the official SRU testing I have uploaded a package identical to the SRU to my PPA. Please test this package and report here.

Please go to

https://launchpad.net/~till-kamppeter/+archive/ppa

and see the "Adding this PPA to your system" for instructions to get my PPA added to your system's software download repositories.

After that do a full system update. The new Ghostscript and some other packages (for other SRUs) will get downloaded and installed.

Please test whether this solves your problem and report here.

Brad Lucier (lucier) wrote :

I installed ghostscript and libgs8 from your PPA:

frying-pan:~/text/papers/zakon/book2> apt-cache policy ghostscript libgs8
ghostscript:
  Installed: 8.71.dfsg.1-0ubuntu5.3~0ppa1
  Candidate: 8.71.dfsg.1-0ubuntu5.3~0ppa1
  Version table:
 *** 8.71.dfsg.1-0ubuntu5.3~0ppa1 0
        500 http://ppa.launchpad.net/till-kamppeter/ppa/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status
     8.71.dfsg.1-0ubuntu5.2 0
        500 http://ubuntu.media.mit.edu/ubuntu/ lucid-updates/main Packages
        500 http://ubuntu.media.mit.edu/ubuntu/ lucid-security/main Packages
     8.71.dfsg.1-0ubuntu5 0
        500 http://ubuntu.media.mit.edu/ubuntu/ lucid/main Packages
libgs8:
  Installed: 8.71.dfsg.1-0ubuntu5.3~0ppa1
  Candidate: 8.71.dfsg.1-0ubuntu5.3~0ppa1
  Version table:
 *** 8.71.dfsg.1-0ubuntu5.3~0ppa1 0
        500 http://ppa.launchpad.net/till-kamppeter/ppa/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status
     8.71.dfsg.1-0ubuntu5.2 0
        500 http://ubuntu.media.mit.edu/ubuntu/ lucid-updates/main Packages
        500 http://ubuntu.media.mit.edu/ubuntu/ lucid-security/main Packages
     8.71.dfsg.1-0ubuntu5 0
        500 http://ubuntu.media.mit.edu/ubuntu/ lucid/main Packages

These packages fix both the test file I posted above and my original problems that led to the smaller test file.

Jonathan Riddell (jr) wrote :

In lucid-proposed unapproved queue, needs approval from ubuntu-sru

John Dong (jdong) wrote :

ACK from -SRU team

Accepted ghostscript into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed

I previously installed ghostscript and libgs8 from Till Kamppeter's ppa.

When I tried to follow the instructions given above, I get the following
results:

frying-pan:~/text/papers/jingyue/fourthtry> sudo aptitude install ghostscript/lucid-proposed
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages are BROKEN:
  ghostscript
The following packages will be REMOVED:
  akonadi-server{u} kdebase-workspace-bin{u} kdebase-workspace-data{u} kdebase-workspace-kgreet-plugins{u}
  kdepim-runtime{u} ksysguardd{u} libdb4.6{u} libgda3-sqlite{u} libkephal4{u} libkfontinst4{u}
  libkscreensaver5{u} libksgrd4{u} libkworkspace4{u} libplasma-applet-system-monitor4{u}
  libplasma-geolocation-interface4{u} libplasmaclock4{u} libplasmagenericshell4{u} libpolkit-dbus2{u}
  libpolkit-gnome0{u} libpolkit-grant2{u} libpolkit2{u} libprocesscore4{u} libprocessui4{u}
  libqimageblitz4{u} libsolidcontrol4{u} libsolidcontrolifaces4{u} libtaskmanager4{u} libweather-ion4{u}
  plasma-dataengines-workspace{u} plasma-widgets-workspace{u} policykit{u}
The following packages are RECOMMENDED but will NOT be installed:
  psfontmgr
1 packages upgraded, 0 newly installed, 31 to remove and 0 not upgraded.
Need to get 786kB of archives. After unpacking 50.0MB will be freed.
The following packages have unmet dependencies:
  ghostscript: Depends: libgs8 (= 8.71.dfsg.1-0ubuntu5.3) but 8.71.dfsg.1-0ubuntu5.3~0ppa1 is installed.
The following actions will resolve these dependencies:

Upgrade the following packages:
libgs8 [8.71.dfsg.1-0ubuntu5.3~0ppa1 (lucid, now) -> 8.71.dfsg.1-0ubuntu5.3 (lucid-proposed)]

Score is 80

Accept this solution? [Y/n/q/?]

What it says about ghostscript and lbigs8 make sense, but I'm hesitant
to continue when it says that all those other packages (I'm not really
sure what they do) are to be REMOVED.

Should I go ahead and remove these packages?

@lucier: those packages where probably automatically installed and are now considered unused by aptitude and automatically removed. Only you know if they are still useful on your system.

If you don't want to remove the automatically installed packages, you can use 'apt-get install' instead of aptitude which will suggest to remove them or with aptitude enter ':~M' (without the quotes which means "keep the packages at the current state when the state is 'automatically installed'") at the confirmation prompt.

SRU verification for Lucid:
I have reproduced the problem with ghostscript 8.71.dfsg.1-0ubuntu5.2 in lucid-updates and have verified that the version of ghostscript 8.71.dfsg.1-0ubuntu5.3 in -proposed fixes the issue. I've run the regression tests with success.

Marking as verification-done

tags: added: verification-done
removed: verification-needed
Brad Lucier (lucier) wrote :

I realize that this is a bit late, but I finally got around to testing ghostscript 8.71.dfsg.1-0ubuntu5.3 in -proposed and it fixes both my original problem and the reduced test case I submitted with this bug report.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 8.71.dfsg.1-0ubuntu5.3

---------------
ghostscript (8.71.dfsg.1-0ubuntu5.3) lucid-proposed; urgency=low

  * debian/patches/ps2pdf-hyperlinks.dpatch: Let ps2pdf create proper hyperlinks
    (LP: #583990, upstream bug #691344).
 -- Till Kamppeter <email address hidden> Mon, 19 Jul 2010 19:15:20 +0200

Changed in ghostscript (Ubuntu Lucid):
status: Fix Committed → Fix Released

Lucier, no problem, Jean-Baptiste Lallement has already verified the fix and so the fix already got included in the official updates. Thank you for reporting the bug and testing the fix anyway.

Changed in gs-gpl:
importance: Unknown → Medium
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.