I installed cups-pdf 3.0 beta 2 on a Redhat 7 OS.
I compiled the code manually (as per the instructions on their site) after I installed cups-devel-1.6.3-17.el7_1.1. I am running cups-devel-1.6.3-17.el7_1.1. I disabled SELinux temporarily to just to make sure it doesn't interfere with this.
I created a printer called Cups-PDF using this command:
/usr/sbin/lpadmin -p Cups-PDF -v cups-pdf:/ -m CUPS-PDF_opt.ppd -D "PDF Virtual printer" -E
where CUPS-PDF_opt.ppd is a file in the distribution archive.
I have/had the following problems:
- The printer definition disappeared after I restarted cups. Not sure why and I had to recreate it every time I restarted cups. But now it's in printers.conf. Perhaps it was because SELinux was enabled at one point.
- cups-pdf doesn't seem to read the cups-pdf.conf file which I copied in /etc/cups. This is the default location in the cups-pdf.h file for the configuration file. The files are generated in /var/spool/cups instead of /var/spool/cups-pdf/${USER}.
echo "Test" | lpr -P Cups-PDF
generates a text file not a pdf file. When I print the http://localhost:631/printers/Cups-PDF?which_jobs=all page in FireFox, then it works fine, a file is generated in the /var/spool/cups folder and if I set it's extension to pdf it opens almost ok. When I open it on Windows with Acrobat Reader, it shows an error: the font 'DSXFCQ+ NimbusSansL' contains a bad /BBox.
What am I doing wrong? I also checked the security permissions on files and they seem ok. All the print commands that I tried were ran using root.
Thanks
Just an update: I checked messages and I still get this:
Jan 8 18:17:58 computer setroubleshoot: failed to retrieve rpm info for /usr/lib/cups/backend/cups-pdf
Jan 8 18:17:58 computer setroubleshoot: SELinux is preventing /usr/lib/cups/backend/cups-pdf from remove_name access on the directory cups2pdf-3920. For complete SELinux messages. run sealert -l 497551b3-64a7-466e-8f91-1b8b3dff4884
Jan 8 18:17:58 computer python: SELinux is preventing /usr/lib/cups/backend/cups-pdf from remove_name access on the directory cups2pdf-3920.
***** Plugin catchall (100. confidence) suggests **************************
If you believe that cups-pdf should be allowed remove_name access on the cups2pdf-3920 directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep cups-pdf /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp
Another update: After I followed the suggestion from this last log message it started working properly.