Bug 1252279 - printing with a2ps to a cups-pdf printer does not work
printing with a2ps to a cups-pdf printer does not work
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: cups-pdf (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Remi Collet
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-11 02:18 EDT by Joachim Backes
Modified: 2017-11-14 06:05 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-14 06:05:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joachim Backes 2015-08-11 02:18:30 EDT
Description of problem:
I have installed a cups-pdf-printer (cups-pdf-2.6.1-9.fc22.x86_64) called pdf.

But if I print with a2ps to this printer, for example with:

a2ps -Ppdf /etc/passwd

All seems to work:

[/etc/passwd (plain): 1 page on 1 sheet]
[Total: 1 page on 1 sheet] sent to the printer `pdf'
[2 lines wrapped]

but no output appears in the dedicated directory for this pdf printer.
The printer itself is OK, because printing to it with "lpr -Ppdf /etc/passwd" is OK!


Version-Release number of selected component (if applicable):
a2ps-4.14-26.fc22.x86_64

How reproducible:
always

Steps to Reproduce:
1.a2ps -Ppdf /etc/passwd
2.
3.

Actual results:
No output is generated in the dedicated output directory

Expected results:
output is generated in the dedicated output directory

Additional info:
Comment 1 Joachim Backes 2015-08-11 02:28:02 EDT
The output directory for the cups-pdf printer is

"Out ${DESKTOP}/PDF" (in /etc/cups/cups-pdf.conf)

where ~/Desktop/PDF is an existing directory.

But after printing with a2ps to the printer "pdf" I find the output in pdf files located in  ~/Desktop, and not in ~/Desktop/PDF.
Comment 2 Remi Collet 2015-08-11 03:56:31 EDT
Hmm... I cannot reproduce.

$ LANG=C a2ps -PCups-PDF /etc/passwd
[/etc/passwd (plain): 2 pages on 1 sheet]
request id is Cups-PDF-47 (0 file(s))
[Total: 2 pages on 1 sheet] sent to the printer `Cups-PDF'
[4 lines wrapped]


In /etc/cups/cups-pdf.conf
  Out ${DESKTOP}/Print
  LogType 7


In cups-pdf_log
Tue Aug 11 09:53:33 2015  [DEBUG] found end of postscript code (%%EOF)
Tue Aug 11 09:53:33 2015  [DEBUG] all data written to spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-2819)
Tue Aug 11 09:53:33 2015  [DEBUG] trying to use PS title (passwd)
Tue Aug 11 09:53:33 2015  [DEBUG] removing special characters from title (passwd)
Tue Aug 11 09:53:33 2015  [DEBUG] title successfully retrieved (passwd)
Tue Aug 11 09:53:33 2015  [DEBUG] input data read from stdin
Tue Aug 11 09:53:33 2015  [DEBUG] output filename created (/home/remi/Desktop/Print/passwd.pdf)
Tue Aug 11 09:53:33 2015  [DEBUG] ghostscript commandline built (/usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="/home/remi/Desktop/Print/passwd.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f /var/spool/cups-pdf/SPOOL/cups2pdf-2819)
Tue Aug 11 09:53:33 2015  [DEBUG] output file unlinked (/home/remi/Desktop/Print/passwd.pdf)
Tue Aug 11 09:53:33 2015  [DEBUG] TMPDIR set for GhostScript (/var/tmp)
Tue Aug 11 09:53:33 2015  [DEBUG] waiting for child to exit
Tue Aug 11 09:53:33 2015  [DEBUG] entering child process
Tue Aug 11 09:53:33 2015  [DEBUG] GID set for current user
Tue Aug 11 09:53:33 2015  [DEBUG] supplementary groups set for current user
Tue Aug 11 09:53:33 2015  [DEBUG] UID set for current user (remi)
Tue Aug 11 09:53:33 2015  [DEBUG] ghostscript succeeded
Tue Aug 11 09:53:33 2015  [DEBUG] file mode set for user output (/home/remi/Desktop/Print/passwd.pdf)
Tue Aug 11 09:53:33 2015  [DEBUG] no postprocessing
Tue Aug 11 09:53:33 2015  [DEBUG] spoolfile unlinked (/var/spool/cups-pdf/SPOOL/cups2pdf-2819)
Tue Aug 11 09:53:33 2015  [DEBUG] all memory has been freed
Tue Aug 11 09:53:33 2015  [STATUS] PDF creation successfully finished (/home/remi/Desktop/Print/passwd.pdf)
Comment 3 Joachim Backes 2015-08-11 04:19:43 EDT
I switched to LogType 7 too in /etc/cups/cups-pdf.conf. After printing /etc/passwd to the pdf printer, seeing the following line in /var/log/cups/cups-pdf_log:

------------------------------ snip ----------------------------------------------
Tue Aug 11 08:09:39 2015  [STATUS] PDF creation successfully finished (/home/backes/Desktop/PDF/job_501-passwd.pdf)
------------------------------- snap ---------------------------------------------


But this msg is incorrect: No file /home/backes/Desktop/PDF/job_501-passwd.pdf found, but found ~/Desktop/passwd.pdf

Access rights of ~/Desktop/PDF:

drwxrwxr-x 2 backes backes 4096 Aug 11 08:10 /home/backes/Desktop/PDF
Comment 4 Remi Collet 2015-08-11 05:01:16 EDT
Full log please, with [DEBUG] line.
Comment 5 Joachim Backes 2015-08-11 07:37:14 EDT
(In reply to Remi Collet from comment #4)
> Full log please, with [DEBUG] line.

How to do this? Using cupsctl --debug-logging was unseccessful!
Comment 6 Remi Collet 2015-08-11 07:47:48 EDT
LogType 7 in cups-pdf.conf should be enough.
Comment 7 Joachim Backes 2015-08-11 07:56:15 EDT
Modifying again /etc/cup/cups-pdf.conf

==>

sudo grep Log /etc/cups/cups-pdf.conf

# Log Settings								  #
### Key: Log
Log /var/log/cups
### Key: LogType
#LogType 3
LogType  7

But no file named cups_pdf.log in /var/log/cups after printing to the printer "pdf"
Comment 8 Remi Collet 2015-08-11 08:12:11 EDT
Sorry but definitively cannot understand or reproduce your issue

How have you installed cups-pdf ? and created the printer ?
Comment 9 Joachim Backes 2015-08-11 08:28:05 EDT
(In reply to Remi Collet from comment #8)
> Sorry but definitively cannot understand or reproduce your issue
> 
> How have you installed cups-pdf ? and created the printer ?

Sure, since years.

But I think I could solve the problem by renaming the printer from "pdf" to "cups-pdf"! The a2ps works flawlessly :-)

But: Why the whole things work only if the cups-pdf printer is named "cups-pdf"?
Why then system-config-printer allows to rename the printer "cups-pdf" to "pdf"?
Comment 10 Fedora End Of Life 2017-07-25 15:08:22 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 11 Joachim Backes 2017-07-25 15:11:40 EDT
SAme behaviour in F26
Comment 12 Joachim Backes 2017-11-14 06:05:18 EST
Seems to be fixed in F27

Note You need to log in before you can comment on or make changes to this bug.