[cups.general] Apps dont print / wrong filters applied?

Johannes Meixner jsmeix at suse.de
Thu Feb 23 01:17:03 PST 2012


Hello,

On Feb 22 10:09 allesquarks wrote (excerpt):
> Im running a Suse 12.1 and wanted to use our network printers in the office.
> Yast and cups testpages work fine. Also printing via lpr, however printing
> from any (GUI) application doesn't work. In the cups webinterface the jobs
> are scheduled but the job remains at "connected to printer" and the canon
> printer keeps blinking in the state receiving forever...
> Since the raw data are printed I think it is a filter problem.
> Below I attached logs of a print job from an application and afterwards
> from lpr. I don't know if its important but though I print an image
> pdftops is applied as a filter (But printing pdf's doesn't work as well).

I assume that "any (GUI) application" emits PDF as print job data, see
"PDF: The future common printing format" at
http://en.opensuse.org/Concepts_printing
and
https://bugzilla.novell.com/show_bug.cgi?id=732442

Because "printing pdf's doesn't work" the result is that
printing from "any (GUI) application" doesn't work.

I guess printing PFDs from the Adobe Reader (i.e. "acroread") works
because the Adobe Reader emits PostScript as print job data
same as e.g. the YaST/CUPS testpage.

To verify the print job data that (GUI) applications produce,
stop printing for the queue, e.g. via "cupsdisable canon_iR_2870"
then print form the application and inspect what kind of data
the print job data file /var/spool/cups/djob-number-file-number
in the CUPS spool directory is.
To re-enable printing use e.g. "cupsenable canon_iR_2870".

If (GUI) applications produce PDF, try to change them to
produce PostScript. For example in the LibreOffice printing
dialog it is a bit hidden below "Properties..." -> "Device"
where you can select e.g. PostScript Level 2.
I don't know how to switch KDE or Gnome applications
from PDF back to PostScript.


> D [22/Feb/2012:18:40:14 +0100] [Job 27] Request file type is application/pdf.
....
> I [22/Feb/2012:18:40:14 +0100] [Job 27] Started filter /usr/lib/cups/filter/pdftops (PID 28228)
> I [22/Feb/2012:18:40:14 +0100] [Job 27] Started filter /usr/lib/cups/filter/pstoufr2cpca (PID 28229)
> I [22/Feb/2012:18:40:14 +0100] [Job 27] Started backend /usr/lib/cups/backend/socket (PID 28230)
....
> D [22/Feb/2012:18:40:14 +0100] [Job 27] Started filter pdftops (PID 28231)
> D [22/Feb/2012:18:40:14 +0100] [Job 27] Started filter pstops (PID 28232)

The second "pdftops (PID 28231)" plus "pstops (PID 28232)" are
launched by /usr/lib/cups/filter/pdftops  - the pdftops is not
the CUPS filter /usr/lib/cups/filter/pdftops but the system
binary /usr/bin/pdftops which is provided by Poppler.

What looks strange on a first glance is "Started filter pstops".
I would expect a "Started filter /usr/lib/cups/filter/pstops"
to make sure the CUPS filter /usr/lib/cups/filter/pstops is run
and not by accident a system binary /usr/bin/pstops which could
be e.g. /usr/bin/pstops from the old "psutils".
But looking at the CUPS 1.5.0 sources filter/pdftops.c
--------------------------------------------------------------------------
   if ((cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL)
     cups_serverbin = CUPS_SERVERBIN;

   snprintf(pstops_path, sizeof(pstops_path), "%s/filter/pstops",
            cups_serverbin);
....
   fprintf(stderr, "DEBUG: Started filter pstops (PID %d)\n", pstops_pid);
--------------------------------------------------------------------------
shows that actually /usr/lib/cups/filter/pstops is run
and "Started filter pstops" is only a hardcodeed message.

In the end nothing looks wrong here - only that the
filtering seems to never finish in your case when you
print PDF - but I don't know why - I don't see errors.


> D [22/Feb/2012:18:48:49 +0100] [Job 30] Request file type is image/jpeg.
....
> I [22/Feb/2012:18:48:49 +0100] [Job 30] Started filter /usr/lib/cups/filter/imagetops (PID 28486)
> I [22/Feb/2012:18:48:49 +0100] [Job 30] Started filter /usr/lib/cups/filter/pstoufr2cpca (PID 28487)
> I [22/Feb/2012:18:48:49 +0100] [Job 30] Started backend /usr/lib/cups/backend/socket (PID 28488)
....
> D [22/Feb/2012:18:48:49 +0100] PID 28486 (/usr/lib/cups/filter/imagetops) exited with no errors.
....
> D [22/Feb/2012:18:48:50 +0100] PID 28487 (/usr/lib/cups/filter/pstoufr2cpca) exited with no errors.
....
> D [22/Feb/2012:18:48:50 +0100] PID 28488 (/usr/lib/cups/backend/socket) exited with no errors.
....
> I [22/Feb/2012:18:48:50 +0100] [Job 30] Job completed.

This is how filtering is usually done.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer





More information about the cups mailing list