Created attachment 1859022 [details] The result of printing from LibreOffice Description of problem: Any attempt to use the `cups-pdf` printer to print out the document results in error messages printed to the pdf instead of the document. I have tested with `gnome-text-editor` and LibreOffice Writer with the same result so it seems the applications are not the culprit. However, I have not seen any errors in the logs, the `cups-pdf-Cups-PDF_log` shows my two jobs and reports them as successfully finished. Version-Release number of selected component (if applicable): cups-pdf-3.0.1-15 gnome-shell-42~alpha How reproducible: Always Steps to Reproduce: 1. Install the cups-pdf printer. 2. Open any text editor available in standard Fedora Workstation 3. Type a sentence. 4. Print it over the cups-pdf printer. Actual results: See the attachment for how the result looks like. Expected results: Correct print should be saved
Created attachment 1859023 [details] First page of result from gnome-text-editor
Created attachment 1859030 [details] Second page of result from gnome-text-editor
I don´t have a machine currently running rawhide, until I get to install a new VM, can you increase the log with: LogType 3 in /etc/cups/cups-pdf.conf? Please retry and attach the new information on cups-pdf-Cups-PDF_log, and look for the most recent file named /var/spool/cups/d* (start with a lowecase d), this is the source file CUPS receive from the client, attach it too. If it comes from GEdit, it must already be a PDF, so you can check it before attaching it to the bug report. I wonder if a new change on Ghostscript require an update on how it is invoked.
(In reply to Robert Marcano from comment #3) > I don´t have a machine currently running rawhide, until I get to install a > new VM, can you increase the log with: > > LogType 3 Sorry it is "LogType 7" 3 is the default. > > in /etc/cups/cups-pdf.conf? > > Please retry and attach the new information on cups-pdf-Cups-PDF_log, and > look for the most recent file named /var/spool/cups/d* (start with a > lowecase d), this is the source file CUPS receive from the client, attach it > too. If it comes from GEdit, it must already be a PDF, so you can check it > before attaching it to the bug report. > > I wonder if a new change on Ghostscript require an update on how it is > invoked.
The content of the cups-pdf log file: --------------------------------------- Mon Feb 7 13:07:19 2022 [DEBUG] *** Final Configuration *** Mon Feb 7 13:07:19 2022 [DEBUG] AnonDirName = "/var/spool/cups-pdf/ANONYMOUS" Mon Feb 7 13:07:19 2022 [DEBUG] AnonUser = "nobody" Mon Feb 7 13:07:19 2022 [DEBUG] GhostScript = "/usr/bin/gs" Mon Feb 7 13:07:19 2022 [DEBUG] GSCall = "%s -q -dCompatibilityLevel=%s -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="%s" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c 30000000 setvmthreshold -f %s" Mon Feb 7 13:07:19 2022 [DEBUG] Grp = "lp" Mon Feb 7 13:07:19 2022 [DEBUG] GSTmp = "TMPDIR=/var/tmp" Mon Feb 7 13:07:19 2022 [DEBUG] Log = "/var/log/cups" Mon Feb 7 13:07:19 2022 [DEBUG] PDFVer = "1.4" Mon Feb 7 13:07:19 2022 [DEBUG] PostProcessing = "" Mon Feb 7 13:07:19 2022 [DEBUG] Out = "${DESKTOP}" Mon Feb 7 13:07:19 2022 [DEBUG] Spool = "/var/spool/cups-pdf/SPOOL" Mon Feb 7 13:07:19 2022 [DEBUG] UserPrefix = "" Mon Feb 7 13:07:19 2022 [DEBUG] RemovePrefix = "" Mon Feb 7 13:07:19 2022 [DEBUG] OutExtension = "pdf" Mon Feb 7 13:07:19 2022 [DEBUG] Cut = 3 Mon Feb 7 13:07:19 2022 [DEBUG] Truncate = 64 Mon Feb 7 13:07:19 2022 [DEBUG] DirPrefix = 0 Mon Feb 7 13:07:19 2022 [DEBUG] Label = 2 Mon Feb 7 13:07:19 2022 [DEBUG] LogType = 7 Mon Feb 7 13:07:19 2022 [DEBUG] LowerCase = 1 Mon Feb 7 13:07:19 2022 [DEBUG] TitlePref = 0 Mon Feb 7 13:07:19 2022 [DEBUG] DecodeHexStrings = 0 Mon Feb 7 13:07:19 2022 [DEBUG] FixNewlines = 0 Mon Feb 7 13:07:19 2022 [DEBUG] AllowUnsafeOptions = 0 Mon Feb 7 13:07:19 2022 [DEBUG] AnonUMask = 0000 Mon Feb 7 13:07:19 2022 [DEBUG] UserUMask = 0077 Mon Feb 7 13:07:19 2022 [DEBUG] *** End of Configuration *** Mon Feb 7 13:07:19 2022 [DEBUG] set new gid: lp Mon Feb 7 13:07:19 2022 [DEBUG] initialization finished: v3.0.1 Mon Feb 7 13:07:19 2022 [DEBUG] user identified: miska Mon Feb 7 13:07:19 2022 [DEBUG] XDG_DESKTOP_DIR: Mon Feb 7 13:07:19 2022 [DEBUG] output directory name generated: /home/miska/Desktop Mon Feb 7 13:07:19 2022 [DEBUG] user information prepared Mon Feb 7 13:07:19 2022 [DEBUG] spoolfile name created: /var/spool/cups-pdf/SPOOL/cups2pdf-3128 Mon Feb 7 13:07:19 2022 [DEBUG] source stream ready Mon Feb 7 13:07:19 2022 [DEBUG] destination stream ready: /var/spool/cups-pdf/SPOOL/cups2pdf-3128 Mon Feb 7 13:07:19 2022 [DEBUG] owner set for spoolfile: /var/spool/cups-pdf/SPOOL/cups2pdf-3128 Mon Feb 7 13:07:19 2022 [DEBUG] using traditional fgets Mon Feb 7 13:07:19 2022 [DEBUG] found beginning of postscript code: %!PS-Adobe-3.0 Mon Feb 7 13:07:19 2022 [DEBUG] now extracting postscript code Mon Feb 7 13:07:19 2022 [DEBUG] found title in ps code: (gnome-text-editor job #1) Mon Feb 7 13:07:19 2022 [DEBUG] found end of postscript code: %%EOF Mon Feb 7 13:07:19 2022 [DEBUG] all data written to spoolfile: /var/spool/cups-pdf/SPOOL/cups2pdf-3128 Mon Feb 7 13:07:19 2022 [DEBUG] trying to use PS title: (gnome-text-editor job #1) Mon Feb 7 13:07:19 2022 [DEBUG] removing special characters from title: (gnome-text-editor job #1) Mon Feb 7 13:07:19 2022 [DEBUG] removing trailing _ from title: _gnome-text-editor_job__1__ Mon Feb 7 13:07:19 2022 [DEBUG] removing leading _ from title: _gnome-text-editor_job__1 Mon Feb 7 13:07:19 2022 [DEBUG] title successfully retrieved: gnome-text-editor_job__1-job_3 Mon Feb 7 13:07:19 2022 [DEBUG] input data read from stdin Mon Feb 7 13:07:19 2022 [DEBUG] output filename created: /home/miska/Desktop/gnome-text-editor_job__1-job_3.pdf Mon Feb 7 13:07:19 2022 [DEBUG] ghostscript commandline built: /usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="/home/miska/Desktop/gnome-text-editor_job__1-job_3.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c 30000000 setvmthreshold -f /var/spool/cups-pdf/SPOOL/cups2pdf-3128 Mon Feb 7 13:07:19 2022 [DEBUG] output file unlinked: /home/miska/Desktop/gnome-text-editor_job__1-job_3.pdf Mon Feb 7 13:07:19 2022 [DEBUG] TMPDIR set for GhostScript: /var/tmp Mon Feb 7 13:07:19 2022 [DEBUG] waiting for child to exit Mon Feb 7 13:07:19 2022 [DEBUG] entering child process Mon Feb 7 13:07:19 2022 [DEBUG] GID set for current user Mon Feb 7 13:07:19 2022 [DEBUG] supplementary groups set for current user Mon Feb 7 13:07:19 2022 [DEBUG] UID set for current user: miska Mon Feb 7 13:07:20 2022 [DEBUG] ghostscript succeeded Mon Feb 7 13:07:20 2022 [DEBUG] file mode set for user output: /home/miska/Desktop/gnome-text-editor_job__1-job_3.pdf Mon Feb 7 13:07:20 2022 [DEBUG] no postprocessing Mon Feb 7 13:07:20 2022 [DEBUG] spoolfile unlinked: /var/spool/cups-pdf/SPOOL/cups2pdf-3128 Mon Feb 7 13:07:20 2022 [STATUS] PDF creation successfully finished Mon Feb 7 13:07:20 2022 [DEBUG] all memory has been freed
Created attachment 1859563 [details] The spool file printed out of Gnome-Text-Editor
Proposed as a Blocker for 36-final by Fedora user lruzicka using the blocker tracking app because: Violates the Printing Criteria: Printing must work in release-blocking desktops on at least one printer using each of the following drivers: The built-in print-to-PDF driver The generic IPP driver https://fedoraproject.org/wiki/Fedora_36_Final_Release_Criteria#Printing
Discussed during the 2022-02-07 blocker review meeting: [0] The decision to classify this bug as a "RejectedBlocker (Beta)" was made as this bug appears to be specific to the cups-pdf virtual printer, which isn't actually covered by the criteria. We will revisit if it turns out to affect GNOME's or KDE's built-in PDF printing features, or a real physical printer. We'll also consider whether and how to adjust the openQA tests as well. [0] https://meetbot.fedoraproject.org/fedora-blocker-review/2022-02-07/f36-blocker-review.2022-02-07-17.00.txt
Interesting additional info: This does not happen on KDE and Kwrite. The problematic behaviour only happens in Gnome. I will also check XFCE to see how that goes there.
Have you tried disabling SELinux enforcement temporarily? (setenforce 0). I was thinking it could be a SELinux policy issue since the error on the PDF says IOError, but it working on another desktop environment, makes it less related. CUPS-PDF have always needed a special exception to be able to put files on the user Desktop, so it is not far fetched. Another thing to try is a `restorecon -R /home/<user>` My VM is just being updated at 30 kbps right now (crappy ISPs), so it will take a little more time to reproduce.
On Xfce, the situation is the same as with Gnome. I have tried both `setenforce 0` or `restorecon` but neither did help. With Permissive, the situation is the same.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
Confirmed on my rawhide VM
cups-pdf-3.0.1-16.fc37 should be the error printed on the PDF output, the upstream CUPS-PDF code was corrupting the source file. The output still has a problem, it is improperly scaled inside the page, but this look more like something before CUPS-PDF gets the source file, because a simple ps2pdf generated the same badly scaled PDF from the same file submitted to CUPS. Need to investigate more before pushing to the F36 branch.
Submitted Bug #2054232 about the empty page added at the end.
FEDORA-2022-64f198a523 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-64f198a523
FEDORA-2022-b07e01cd7c has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b07e01cd7c
FEDORA-2022-64f198a523 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-64f198a523` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-64f198a523 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-b07e01cd7c has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-b07e01cd7c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-b07e01cd7c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-b07e01cd7c has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-64f198a523 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.