Ghostscript renders only a part of the attached PDF file when using a high resolution

Bug #902599 reported by 1448412
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Medium
ghostscript (Ubuntu)
Fix Released
High
Unassigned
Oneiric
Fix Released
High
Unassigned

Bug Description

When printing the document attached, cups only prints one of the three boxes. The rest of the page is white.
I tried submitting the document using evince and lpr.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cups 1.5.0-8ubuntu5
ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
Uname: Linux 3.0.0-13-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
CupsErrorLog:
 W [10/Dec/2011:08:11:11 +0100] failed to AddProfile: org.freedesktop.ColorManager.Failed:profile object path '/org/freedesktop/ColorManager/profiles/Photosmart_D7100_series_Gray__' has already been added
 W [10/Dec/2011:08:11:11 +0100] failed to AddProfile: org.freedesktop.ColorManager.Failed:profile object path '/org/freedesktop/ColorManager/profiles/Photosmart_D7100_series_RGB__' has already been added
Date: Sat Dec 10 20:00:21 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
Lpstat: device for Photosmart-D7100-series: hp:/usb/Photosmart_D7100_series?serial=MY73EF11FX04SF
MachineType: Shuttle Inc. SX58
Papersize: a4
PpdFiles: Photosmart-D7100-series: HP Photosmart d7100 Series, hpcups 3.11.7
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-13-generic root=UUID=880e49fb-9989-4ed8-b5b7-daea8e950b8a ro crashkernel=384M-2G:64M,2G-:128M quiet splash vt.handoff=7
SourcePackage: cups
UpgradeStatus: Upgraded to oneiric on 2011-10-19 (52 days ago)
dmi.bios.date: 03/02/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 080016
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: SX58
dmi.board.vendor: Shuttle Inc.
dmi.board.version: V10
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Intel
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr080016:bd03/02/2010:svnShuttleInc.:pnSX58:pvrV10:rvnShuttleInc.:rnSX58:rvrV10:cvnIntel:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: SX58
dmi.product.version: V10
dmi.sys.vendor: Shuttle Inc.

Revision history for this message
1448412 (uli-rgbg) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I can reproduce this bug and it is a problem of Ghostscript's PDF interpreter. I have printed the attached file Ausgabe.pdf into a PDF file with evince (Printer "Print to File", resulting PDF file attached). Then I have run the following Ghostscript command line on it

cat Ausgabe-evince.pdf | /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=png16m -sstdout=%stderr -sOutputFile=%stdout -r200x200 -_ > out.png

and out.png showed only the horizontal "Presse" at the bottom. The problem only occurs with high, printing-typical resolutions. If I use "-r100x100" I get correct output. All higher resolutions only give me the horizontal "Presse" at the bottom.

The output device does not matter. The original command line with the "cups" output device

cat Ausgabe-evince.pdf | /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -sMediaType=Plain -sOutputType=0 -dDuplex -r600x600 -dMediaPosition=7 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=832 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=17 -scupsPageSizeName=A4 -I/usr/share/cups/fonts -c -f -_ > out.raster

shows the same problem and also changing the color space parameters or removing all parameters except " -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r600x600" shows the problem.

Whenever the problem occurs, Ghostscript takes unusually long time to finish.

Using the "cups" output device in a monochrome mode, like with this commandf line

cat Ausgabe-evince.pdf | /usr/bin/gs -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -r600x600 -_ > out.raster

lets the upper right rectangle with vertical "Presse" appear in a very light gray.

To visualize CUPS Raster files I use

http://www.easysw.com/~mike/rasterview/index.html

affects: cups (Ubuntu) → ghostscript (Ubuntu)
Changed in ghostscript (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
summary: - Cups does only print 1/3 of all objects in document.
+ Ghostscript renders only a part of the attached PDF file when using a
+ high resolution
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have reported the problem upstream now:

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

1448412, please subscribe also to this upstream bug report for the case that the upstream developers have additional questions.

Changed in gs-gpl:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
1448412 (uli-rgbg) wrote :

Hi Till,

thanks for your help! This is quite an ugly bug...

Regarding your tests:
I can confirm that (using the original file I posted):

cat Ausgabe.pdf | /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=png16m -sstdout=%stderr -sOutputFile=%stdout -r200x200 -_ > out.png

shows the rendering problems also on my machine. While:

cat Ausgabe.pdf | /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=png16m -sstdout=%stderr -sOutputFile=%stdout -r100x100 -_ > out.png

does not.

I subscribed to the upstream report at ghostscript and will try to be of help there...

Best regards!

Revision history for this message
garybrlow (garybrlow) wrote :

Hi all,

I can confirm/reproduce this bug using the attached sample file. Out of the Presse Boxes only the one at the bottom gets printed. However, I have a bigger problem. I'm currently printing pdf's of identification cards with lots of layers and objects plus transparencies generated by inkscape(0.48.2) which are at high resolution, some at 100dpi and some at 200dpi. They do not get printed at all, cups generates a "/usr/lib/cups/filter/gstoraster failed" error. Adobe Acrobat Reader hangs and Evince finishes but the print manger shows the error. Printing directly from Inkscape (SVG) also gets the same error.

Printing was fine a few days ago but when the updates came all I get is the gstoraster failed error. Low resolution pdf's (text) prints fine though. The only work-around suggested is to convert the pdf's to ps or save directly to ps/eps. Saving to ps/eps works but have alignment issues on print-out .

System Configuration:
Xubuntu 11.10 Oneiric
CUPS 1.5.0-8ubuntu6
GhostScript 9.04~dfsg-0ubuntu11.3 (including 11.4 via proposed repository same result)
Printer: Epson T13
Printer Driver: Avasys epson-inkjet-printer-n10-nx127 (including cups-driver-gutenprint_5.2.7-2ubuntu4 same result)

Changed in gs-gpl:
status: Confirmed → In Progress
Changed in gs-gpl:
status: In Progress → Confirmed
Changed in gs-gpl:
status: Confirmed → In Progress
Changed in gs-gpl:
status: In Progress → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fixed in Ghostscript 9.05, which is (at least as pre-release snapshot) uploaded to Precise now. Closing ...

Changed in ghostscript (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The small patch of the upstream bug fixes it also in Ghostscript 9.04 for Oneiric. SRU in preparation ...

Changed in ghostscript (Ubuntu Oneiric):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

A fixed version of Ghostscript 9.04 for Oneiric is uploaded to the oneiric-proposed package repository now. As soon as this gets approved, the package gets available for testing and a comment with testing instructions will get posted here. Please test the new package then and report back in this bug report, so that we can move the new package to the official updates for everyone. Thanks.

A debdiff of the changes is attached.

Changed in ghostscript (Ubuntu Oneiric):
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello 1448412, or anyone else affected,

Accepted ghostscript into oneiric-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
Revision history for this message
uli (ulrich-schwenk) wrote :

Hi,

thanks for your help! Currently I'm travelling and no oneiric box is availiable to me. I hope I can test this during the next weekend. Stay tuned!

Best regards,

Ulrich.

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

After install Ghostscript package from proposed on Oneiric the problem was gone.
Now the printer works correctly.

Thanks.

tags: added: verification-done
removed: verification-needed
Revision history for this message
1448412 (uli-rgbg) wrote :

I ordered:

> sudo apt-get install ghostscript/oneiric-proposed libgs9/oneiric-proposed libgs9-common/oneiric-proposed
> cat Desktop/Ausgabe.pdf | /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=png16m -sstdout=%stderr -sOutputFile=%stdout -r200x200 -_ > out.png
>cat Desktop/Ausgabe.pdf | /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=png16m -sstdout=%stderr -sOutputFile=%stdout -r600x600 -_ > out2.png

both out.png showed all elements as expected. Bug is fixed!

Revision history for this message
1448412 (uli-rgbg) wrote :

Thank you all...

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

This bug was fixed in the package ghostscript - 9.04~dfsg-0ubuntu11.5

---------------
ghostscript (9.04~dfsg-0ubuntu11.5) oneiric-proposed; urgency=low

  * debian/patches/020120125-83ce7cf-pattern-clist-improperly-cleared.patch:
    Some PDFs where rendered incompletely when using high resolutions.
    (LP: #902599).
 -- Till Kamppeter <email address hidden> Thu, 26 Jan 2011 09:25:59 +0100

Changed in ghostscript (Ubuntu Oneiric):
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.