Inkscape sends jobs with zero page size

Bug #975972 reported by Dawid Wróbel
56
This bug affects 10 people
Affects Status Importance Assigned to Milestone
HPLIP
Invalid
Undecided
Unassigned
Inkscape
New
Undecided
Unassigned
inkscape (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I attempted to print a simple SVG graphics today from Inkscape and I was surpsised that it wouldn't print at all.
I am not sure whether it's hplip's fault or cups', but cups/error_log says:

"D [07/Apr/2012:15:50:11 +0200] [Job 51] Set job-printer-state-message to "Processing page 1...", current level=INFO
D [07/Apr/2012:15:50:11 +0200] [Job 51] Unrecoverable error: rangecheck in setpagedevice
D [07/Apr/2012:15:50:11 +0200] [Job 51] Operand stack:
D [07/Apr/2012:15:50:11 +0200] [Job 51] true --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- true --nostringval-- .LockSafetyParams true %MediaSource 0 %MediaDestination 0 LeadingEdge 0 --nostringval-- --nostringval-- --nostringval-- 0 --nostringval-- false --nostringval--
D [07/Apr/2012:15:50:11 +0200] [Job 51] Rendering completed
D [07/Apr/2012:15:50:11 +0200] [Job 51] Set job-printer-state-message to "Rendering completed", current level=INFO
D [07/Apr/2012:15:50:11 +0200] [Job 51] prnt/hpcups/HPCupsFilter.cpp 528: cupsRasterOpen failed, fd = 0
D [07/Apr/2012:15:50:11 +0200] [Job 51] prnt/backend/hp.c 839: ERROR: null print job total=0
D [07/Apr/2012:15:50:11 +0200] [Job 51] End of messages
D [07/Apr/2012:15:50:11 +0200] [Job 51] printer-state=3(idle)
D [07/Apr/2012:15:50:11 +0200] [Job 51] printer-state-message="/usr/lib/cups/filter/hpcups failed"
D [07/Apr/2012:15:50:11 +0200] [Job 51] printer-state-reasons=none"

The same SVG rasterized in GIMP prints just fine, as expected. I didn't try printing the SVG with other vector graphics tools.
If you find it helpful, I can attach the SVG file in question.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: hplip 3.12.2-1ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
Uname: Linux 3.2.0-22-generic x86_64
ApportVersion: 2.0-0ubuntu4
Architecture: amd64
Date: Sat Apr 7 15:56:44 2012
InstallationMedia: Kubuntu 10.10 "Maverick Meerkat" - Beta amd64 (20100902.1)
Lpstat: device for Photosmart_Plus_B210: hp:/net/Photosmart_Plus_B210_series?zc=HPAD89C4
MachineType: Dell Inc. Latitude E6400
Papersize: letter
PpdFiles: Photosmart_Plus_B210: HP Photosmart Plus b210 Series, hpcups 3.12.2
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-22-generic root=UUID=c0ac5e9b-4a61-4d91-a546-5379b9ba2edb ro ipv6.disable=1 quiet splash vt.handoff=7
SourcePackage: hplip
UpgradeStatus: Upgraded to precise on 2012-03-07 (30 days ago)
dmi.bios.date: 02/16/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A28
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA28:bd02/16/2011:svnDellInc.:pnLatitudeE6400:pvr:rvnDellInc.:rn:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude E6400
dmi.sys.vendor: Dell Inc.

Revision history for this message
Dawid Wróbel (dawidw) wrote :
description: updated
description: updated
Revision history for this message
goutam kodu (goutam-hplip) wrote :

Hi Dawid,

I believe this could be problem with Inkscape application which might be generation a wrong cups input file (pdf/ps) . hpcups filter accepts the raster file genereated by the ghostscript. GIMP might be generating the correct cups input file (pdf/ps) so it might be getting passed through hpcups filter.

May be somebody form Inkscape team can look into this.

Regards,
Goutam Kodu

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in hplip (Ubuntu):
status: New → Confirmed
Revision history for this message
BoD (bod-c) wrote :
Download full text (3.8 KiB)

I also have the same problem when printing with Inkscape. Printing from other apps works fine. This problem appeared after upgrading from 10.04 to 12.04 :( It used to work fine.

D [30/May/2012:13:46:59 +0200] [Job 1241] Ghostscript command line: /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -sMediaType=Automatic -sOutputType=0 -r600x600 -dMediaPosition=7 -dDEVICEWIDTHPOINTS=0 -dDEVICEHEIGHTPOINTS=0 -dcupsMediaType=-1 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=17 -scupsPageSizeName=Custom -I/usr/share/cups/fonts -c -f -_
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[8]="HOME=/var/spool/cups/tmp"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[10]="SERVER_ADMIN=root@dell-Inspiron-400"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[11]="SOFTWARE=CUPS/1.5.3"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[12]="USER=root"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[13]="CUPS_SERVER=/var/run/cups/cups.sock"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[14]="CUPS_ENCRYPTION=IfRequested"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[15]="IPP_PORT=631"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[16]="CHARSET=utf-8"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[17]="LANG=fr_FR.UTF-8"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[18]="PPD=/etc/cups/ppd/Deskjet_F4200.ppd"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[19]="RIP_MAX_CACHE=128m"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[20]="CONTENT_TYPE=application/pdf"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[21]="DEVICE_URI=hp:/usb/Deskjet_F4200_series?serial=CN8483928S052D"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[22]="PRINTER_INFO=Deskjet_F4200"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[23]="PRINTER_LOCATION="
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[24]="PRINTER=Deskjet_F4200"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[25]="PRINTER_STATE_REASONS=none"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[26]="CUPS_FILETYPE=document"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[27]="FINAL_CONTENT_TYPE=printer/Deskjet_F4200"
D [30/May/2012:13:46:59 +0200] [Job 1241] envp[28]="AUTH_INFO_REQUIRED=none"
D [30/May/2012:13:46:59 +0200] [Job 1241] Start rendering...
D [30/May/2012:13:46:59 +0200] [Job 1241] Set job-printer-state-message to "Start rendering...", current level=INFO
D [30/May/2012:13:46:59 +0200] [Job 1241]...

Read more...

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

It seems that Ghostscript is not able to render the output of Inkskape.

Can you follow the instructions of the sections "CUPS error_log" and "Capturing print job data" on https://wiki.ubuntu.com/DebuggingPrintingProblems for one of the failing Inkskape print jobs?

Changed in ghostscript (Ubuntu):
status: New → Incomplete
Changed in hplip (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel J Blueman (danielblueman) wrote :

I also experience this high-impact issue in Ubuntu 12.04 LTS x64 also.

It does look like CUPS cannot print any output from poppler (used eg by inkscape).

I've attached a simple blank page (testcase.ps) from poppler (generated through Inkscape) that fails to render with the driver script (testcase.sh):
$ ./testcase.sh
...
Unrecoverable error: rangecheck in .putdeviceprops

I suspect that, since printing etc is quite complex behind the scenes, may people have failed to get debugging this far...

Revision history for this message
Daniel J Blueman (danielblueman) wrote :
Changed in ghostscript (Ubuntu):
status: Incomplete → Confirmed
Changed in hplip (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Daniel J Blueman (danielblueman) wrote :

Marking connection with hplip as invalid, as this is likely a poppler (ie broken postscript generation) or ghostscript (ie broken postscript interpretation) issue.

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

For completeness, I'm attaching one of the PPDs I'm trying to render with (though gs doesn't get as far as openinig it).

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

This is the preferred PPD file that unlocks the microweaving to access print resolutions beyond 600dpi, as supplied by Canon.

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

For me your test case looks bogus. The Ghostscript command line is

cat testcase.ps | gs -sstdout=%stderr -r600 -g0x0 -q -dNOPROMPT -dSAFER -sDEVICE=ppmraw -sOutputFile=%stdout - >/dev/null

The "-g0x0" means that the dimensions of the output bitmap should be 0 pixels wide and 0 pixels high. So it seems obvious for me that one gets

Unrecoverable error: rangecheck in .putdeviceprops

I have tried

cat testcase.ps | gs -sstdout=%stderr -r600 -g1000x1000 -q -dNOPROMPT -dSAFER -sDEVICE=ppmraw -sOutputFile=%stdout - > out

and this does not error and the file "out" is a valid image file (being blank as your testcase.ps is also a blank page).

Does the Ghostscript command line of your testcase.sh come from Canon's printer driver?

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

The messages

D [07/Apr/2012:15:50:11 +0200] [Job 51] prnt/hpcups/HPCupsFilter.cpp 528: cupsRasterOpen failed, fd = 0
D [07/Apr/2012:15:50:11 +0200] [Job 51] prnt/backend/hp.c 839: ERROR: null print job total=0

in the error_log of the original poster are due to no data arriving at the HPLIP backend after Ghostscript having errored out right in the beginning, before sending out any data. So HPLIp is not at fault here.

Changed in hplip:
status: New → Invalid
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I need that everyone of you follows the instructions of comment #5 and attaches both the error_log and the file of captured print data. This is needed for me to reproduce this bug.

Changed in ghostscript (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel J Blueman (danielblueman) wrote :

I was running into the rangecheck on the Gutenprint driver also, so looks like this and the Canon driver both set this. I'll develop and test a clean (non-micro) reproducer and attach the error_log tonight.

Thanks for the feedback!

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

Reproducer:
1. boot into ubuntu 12.04 x64 live usb
2. apply all updates, install inkscape
3. install Canon iP3680 with default GIMP+Gutenprint drivers
4. print testpage - succeeds
5. print (eg) blank page in inkscape - fails

Cups debug error logs were captured in both cases; we see the "rangecheck in setpagedevice" with args:

/usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -sMediaClass=AutoSwitch -sMediaType=Plain -r600x600 -dDEVICEWIDTHPOINTS=0 -dDEVICEHEIGHTPOINTS=0 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -dcupsRowFeed=2 -scupsPageSizeName=Custom -I/usr/share/cups/fonts -c -f -_

Revision history for this message
Daniel J Blueman (danielblueman) wrote :
Revision history for this message
Daniel J Blueman (danielblueman) wrote :

Attaching clean error logs from the preferred Canon driver (reasoning: colour rendition, ink density are resolution are far better; printing is always correct unlike intermittent misrendering with Gutenprint)

Revision history for this message
Daniel J Blueman (danielblueman) wrote :
Revision history for this message
garybrlow (garybrlow) wrote :

I confirm this. I have an Epson T13 and all the pdf files generated from vectors done with inkscape are not printed at all. Instead I get the rendering complete message. I think this is related to this bug https://bugs.launchpad.net/ubuntu/+source/cups/+bug/998156.

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

BTW, the Canon printer driver (cnijfilter-common-3.00) was taken from the Oneric packages at:
https://launchpad.net/~michael-gruz/+archive/canon

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

Marking as confirmed, since the requested data has been supplied and to prevent this getting overlooked.

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

Daniel, your Ghostscript command line is broken and does not work with any driver. It contains "-dDEVICEWIDTHPOINTS=0 -dDEVICEHEIGHTPOINTS=0" which means a page of zero width and zero height.

The problem is the application or its print dialog. It seems that a custom page size was selected and then only the attribute "PageSize=Custom" was sent and not the actually set page size. What has to be sent to CUPS is something like "PageSize=Custom.10x20cm" (unit can also be "in", "mm", or "pt"). A print dialog has to offer a widget for setting width and height if the user chooses "Custom". If Inkscape chooses custom because the user has set a canvas size which does not fit any of the printers's (PPD's) page sizes it has to send the correct "PageSize=Custom.<width>x<height><unit>" to CUPS so that the output can be printed.

The attached PostScript file testcase.ps also contains the PostScript code for a custom page size, but also with zero width and height:

----------
[{
%%BeginFeature: *CustomPageSize True
0
0
0
0
0
pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice
%%EndFeature
} stopped cleartomark
----------

Moving to inkscape ...

affects: ghostscript (Ubuntu) → inkscape (Ubuntu)
Changed in inkscape (Ubuntu):
importance: Undecided → High
Revision history for this message
Daniel J Blueman (danielblueman) wrote :

With both Gutenprint and Canon drivers, I have found that going to the 'Print Preview' dialog and printing from there works around the issue, proving this is an issue with Inkscape.

summary: - cupsRasterOpen failed error when printing vector graphics
+ Inkscape sends jobs with zero page size
no longer affects: hplip (Ubuntu)
su_v (suv-lp)
tags: added: printing
Revision history for this message
su_v (suv-lp) wrote :

Please verify that this is not actually a duplicate of bug #998156 as mentioned in comment #19 (upstream bug/regression in GTK+ >= 2.24.10).

See also <http://article.gmane.org/gmane.comp.graphics.inkscape.devel/38078/match=custom> where the same issue with GTK+ 2.24.10 was described affecting printing directly from Inkscape on OS X 10.7.4 (CUPS 1.5.0).

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

All error_log files of failing jobs show that the jobs got sent with "PageSize=Custom.Custom...." which is bug 998156. Marked as duplicate.

Revision history for this message
Jens-r (jensr) wrote :

Hi there!

I Could totally fix this (or a similar) Problem (with the same results, that's why i post here).

First thing to try is hp-check for "manual mode" or hp-check --fix for automated install of hplip dependencies (which apt / aptitude do !not! resolve) and system configuration (like adding users to certain groups and stuff).

Hp-check helped on most machines, but one. So this was really strange.
I tryed using diffrent users on that machine and by that i noticed, that in the File->Page Setup... dialog you have to select Format for: "your printer" and everything works like a charm again.

I even installed Inkscape to verify this. I would guess, that the "PageSize=Custom.Custom...." thing is gone now but i did not check since it works for over a month without any complains now (sorry that it took me so long btw).

Hope that helps!

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.