cups-pdf not creating any output

Bug #1662660 reported by Chelmite
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups-pdf (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

When printing to a PDF file (from Firefox), the PDF file is created, then deleted before the user can access it.

I tried adding info to bug #879172 (https://bugs.launchpad.net/ubuntu/+source/cups-pdf/+bug/879172), but bug #879172 was closed 3 years ago.

I am encountering this bug in Ubuntu 16.10 x86-64, cups-pdf 2.6.1-21

The appropriate lines in /etc/apparmor.d/usr.sbin.cupsd are:
  capability mknod,
  capability dac_override,
  capability dac_read_search,
  @{HOME}/PDF/ rw,
  @{HOME}/PDF/* rw,

The appropriate line in cups-pdf.conf (attached in its entirety) is:
Out ${HOME}/PDF

The log file, /var/log/cups/cups-pdf_log, contains the following debug output:
Tue Feb 7 12:13:07 2017 [DEBUG] title successfully retrieved (235___Bugs___cups-pdf_package___Ubuntu)
Tue Feb 7 12:13:07 2017 [DEBUG] input data read from stdin
Tue Feb 7 12:13:07 2017 [DEBUG] output filename created (/local/home/skelem/PDF/235___Bugs___cups-pdf_package___Ubuntu.pdf)
Tue Feb 7 12:13:07 2017 [DEBUG] ghostscript commandline built (/usr/bin/ps2pdf -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="/local/home/skelem/PDF/235___Bugs___cups-pdf_package___Ubuntu.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f /var/spool/cups-pdf/SPOOL/cups2pdf-27959)
Tue Feb 7 12:13:07 2017 [DEBUG] output file unlinked (/local/home/skelem/PDF/235___Bugs___cups-pdf_package___Ubuntu.pdf)
Tue Feb 7 12:13:07 2017 [DEBUG] TMPDIR set for GhostScript (/var/tmp)
Tue Feb 7 12:13:07 2017 [DEBUG] waiting for child to exit
Tue Feb 7 12:13:07 2017 [DEBUG] entering child process
Tue Feb 7 12:13:07 2017 [DEBUG] GID set for current user
Tue Feb 7 12:13:07 2017 [DEBUG] supplementary groups set for current user
Tue Feb 7 12:13:07 2017 [DEBUG] UID set for current user (skelem)
Tue Feb 7 12:13:07 2017 [DEBUG] ghostscript has finished (32256)
Tue Feb 7 12:13:07 2017 [DEBUG] no postprocessing
Tue Feb 7 12:13:07 2017 [DEBUG] spoolfile unlinked (/var/spool/cups-pdf/SPOOL/cups2pdf-27959)
Tue Feb 7 12:13:07 2017 [DEBUG] all memory has been freed

Revision history for this message
Chelmite (steve-kelem) wrote :
Revision history for this message
Chelmite (steve-kelem) wrote :
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Just some general triage:
- can you reproduce the problem from a live CD (xenial or zesty)?
- can you reproduce the problem on your current system with a guest session user?
- anything special about your installation?

Revision history for this message
Chelmite (steve-kelem) wrote :

I was hoping that I could guide someone knowledgeable through some logical steps, and, possibly find a simple error in one of my config files. My reasoning follows:

The output in the cups-pdf_log file shows that the output pdf file is created (4th line, not counting line wraps).
It shows later, on the 6th DEBUG line, that the output pdf file is unlinked. Because these lines are in the cups-pdf_log file, it implies that (a) I specified the PDF directory properly (otherwise it would be writing somewhere else), (b) why would cups-pdf report that it's unlinking the file? If apparmor were doing the unlinking, wouldn't that fact be logged in some apparmor log and not the cups-pdf_log file?

I'm thinking that it's one of:
1. bad options to ghostscript/ps2pdf. The command line is shown above from the log file. I went through the man page and didn't see any option for deleting a PDF after it's created.
2. Bad configuration for cups-pdf. I would expect that cups would delete temporary print files after a file is sent to a printer, but it shouldn't do that when creating a PDF. I attached the config file. Can you diff with yours?
3. bad configuration of ghostscript/ps2pdt. Perhaps some necessary module wasn't installed. I had to install 16.10 from scratch, because upgrading from 16.04 didn't work.
4. something to do with apparmor. I have no knowledge of how to tweak apparmor. I attached my config file. Can you diff with yours?

Thanks for your help!

Revision history for this message
Rolf Leggewie (r0lf) wrote :

you wrote a lot in #4 but did not answer the questions from #3

Revision history for this message
Chelmite (steve-kelem) wrote :

1. I don't have a live CD for xenial or zesty. I have one for yakkety, and I know I will spend hours trying to figure out which additional packages I need in order to get to the point of trying to reproduce my problem.
2. I did try the experiment with a different account and got the same result.
3. I did summarize what might be special about my system.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Does this issue still affect cups-pdf 3.0.1 packages?

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

This report seems to concern a really old version that no longer ships with any Ubuntu release. Closing.

Changed in cups-pdf (Ubuntu):
status: New → Won't Fix
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.