After installing pdf-cups in Ubuntu 12.04 I cannot print to pdf from Adobe Flash. The printer works perfectly for Mozilla Firefox but silently fails for flash. This happens trying to print from flash using the right-click context menu, but also programmatically (i.e. PrintJob AS class).
This happens on my machine with 4 different versions of the Flash plugin. Specifically: 10.3, 11.2, 11.3 from the Adobe website and 11.2 as redistributed by Ubuntu.
Without enabling debug logging in Cups there is no trace of any printing activity. After enabling debug logging I get the following output in /var/cups/error_log (but still no trace of a print job):
-------------------------------------------
I [20/Jun/2012:16:06:46 +0100] Remote access is disabled.
D [20/Jun/2012:16:06:46 +0100] Added auto ServerAlias nvod
I [20/Jun/2012:16:06:46 +0100] Loaded configuration file "/etc/cups/cupsd.conf"
I [20/Jun/2012:16:06:46 +0100] Using default TempDir of /var/spool/cups/tmp...
I [20/Jun/2012:16:06:46 +0100] Configured for up to 100 clients.
I [20/Jun/2012:16:06:46 +0100] Allowing up to 100 client connections per host.
I [20/Jun/2012:16:06:46 +0100] Using policy "default" as the default.
D [20/Jun/2012:16:06:46 +0100] load_ppd: Loading /var/cache/cups/PDF.data...
D [20/Jun/2012:16:06:46 +0100] Calling DeleteDevice(cups-PDF)
D [20/Jun/2012:16:06:46 +0100] failed to DeleteDevice: org.freedesktop.DBus.Error.InvalidArgs:Type of message, `(s)', does not match expected type `(o)'
D [20/Jun/2012:16:06:46 +0100] Using profile id of PDF-Gray..
D [20/Jun/2012:16:06:46 +0100] Calling CreateProfile(PDF-Gray..,temp)
W [20/Jun/2012:16:06:46 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'PDF-Gray..' already exists
D [20/Jun/2012:16:06:46 +0100] Using profile id of PDF-RGB..
D [20/Jun/2012:16:06:46 +0100] Calling CreateProfile(PDF-RGB..,temp)
W [20/Jun/2012:16:06:46 +0100] failed to CreateProfile: org.freedesktop.ColorManager.AlreadyExists:profile id 'PDF-RGB..' already exists
I [20/Jun/2012:16:06:46 +0100] Registering ICC color profiles for "PDF"
D [20/Jun/2012:16:06:46 +0100] Calling CreateDevice(cups-PDF,temp)
W [20/Jun/2012:16:06:46 +0100] failed to CreateDevice: org.freedesktop.ColorManager.AlreadyExists:device id 'cups-PDF' already exists
D [20/Jun/2012:16:06:46 +0100] cupsdRegisterPrinter(p=0xb87fab70(PDF))
D [20/Jun/2012:16:06:46 +0100] cupsdMarkDirty(P-----)
D [20/Jun/2012:16:06:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Not busy"
D [20/Jun/2012:16:06:46 +0100] load_ppd: Loading /etc/cups/ppd/printer.ppd...
D [20/Jun/2012:16:06:46 +0100] Calling DeleteDevice(cups-printer)
D [20/Jun/2012:16:06:46 +0100] failed to DeleteDevice: org.freedesktop.DBus.Error.InvalidArgs:Type of message, `(s)', does not match expected type `(o)'
D [20/Jun/2012:16:06:46 +0100] cannot open /etc/cups/ppd/printer.ppd
D [20/Jun/2012:16:06:46 +0100] cupsdRegisterPrinter(p=0xb8830238(printer))
D [20/Jun/2012:16:06:46 +0100] cupsdMarkDirty(---p--)
D [20/Jun/2012:16:06:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
I [20/Jun/2012:16:06:46 +0100] Partial reload complete.
I [20/Jun/2012:16:06:46 +0100] Listening to [v1.::1]:631 on fd 9...
I [20/Jun/2012:16:06:46 +0100] Listening to 127.0.0.1:631 on fd 10...
I [20/Jun/2012:16:06:46 +0100] Listening to /var/run/cups/cups.sock:631 on fd 11...
I [20/Jun/2012:16:06:46 +0100] Resuming new connection processing...
D [20/Jun/2012:16:06:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [20/Jun/2012:16:06:46 +0100] Discarding unused server-restarted event...
D [20/Jun/2012:16:06:47 +0100] Report: clients=0
D [20/Jun/2012:16:06:47 +0100] Report: jobs=9
D [20/Jun/2012:16:06:47 +0100] Report: jobs-active=0
D [20/Jun/2012:16:06:47 +0100] Report: printers=2
D [20/Jun/2012:16:06:47 +0100] Report: printers-implicit=0
D [20/Jun/2012:16:06:47 +0100] Report: stringpool-string-count=1376
D [20/Jun/2012:16:06:47 +0100] Report: stringpool-alloc-bytes=10528
D [20/Jun/2012:16:06:47 +0100] Report: stringpool-total-bytes=25864
D [20/Jun/2012:21:16:06 +0100] cupsdAcceptClient: 14 from localhost (Domain)
D [20/Jun/2012:21:16:06 +0100] cupsdReadClient: 14 POST / HTTP/1.1
D [20/Jun/2012:21:16:06 +0100] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [20/Jun/2012:21:16:06 +0100] cupsdAuthorize: No authentication data provided.
D [20/Jun/2012:21:16:06 +0100] cupsdReadClient: 14 1.1 Get-Printer-Attributes 1
D [20/Jun/2012:21:16:06 +0100] Get-Printer-Attributes ipp://localhost/printers/PDF
D [20/Jun/2012:21:16:06 +0100] Returning IPP successful-ok for Get-Printer-Attributes (ipp://localhost/printers/PDF) from localhost
D [20/Jun/2012:21:16:06 +0100] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
-------------------------------------------
I've also run an strace on the Flash plugin to find out more about the failure. This is the "problem part" of the output:
-------------------------------------------
pipe([18, 19]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, chil
d_tidptr=0xb4780928) = 2303
close(18) = 0
write(19, "%!PS-Adobe-3.0\n%%BoundingBox: 0 0 612 792\n", 42) = -1 EPIPE (Broken
pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
close(18) = -1 EBADF (Bad file descriptor)
close(19) = 0
-------------------------------------------
The failure does not always happen when the PS header is written as in this case, sometimes it happens at the 2nd or 3rd write call.
I have tried 2 different versions of Cups with the same results:
- The current Ubuntu 12.04 one (1.5.3-0ubuntu1 I believe)
- The updated one from: https://launchpad.net/~till-kamppeter/+archive/ppa (1.5.3-0ubuntu2~ppa9)
I have not tried any other printers apart from cups-pdf, but since the job seems to never really make it to the print queue (the problem happens earlier), my feeling is that they would all fail.
Just to make sure I tested everything using a different printer, an HP 3055 (network printer). Same results. I can print from Firefox, but printing from Adobe Flash does not work.