Bug 2050615 - Printing not possible over Cups-PDF in Rawhide
Summary: Printing not possible over Cups-PDF in Rawhide
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups-pdf
Version: 36
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Robert Marcano
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: RejectedBlocker
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-04 10:21 UTC by Lukas Ruzicka
Modified: 2022-03-26 15:21 UTC (History)
4 users (show)

Fixed In Version: cups-pdf-3.0.1-16.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-26 15:21:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
The result of printing from LibreOffice (32.58 KB, image/png)
2022-02-04 10:21 UTC, Lukas Ruzicka
no flags Details
First page of result from gnome-text-editor (25.36 KB, image/png)
2022-02-04 10:22 UTC, Lukas Ruzicka
no flags Details
Second page of result from gnome-text-editor (35.05 KB, image/png)
2022-02-04 10:23 UTC, Lukas Ruzicka
no flags Details
The spool file printed out of Gnome-Text-Editor (5.01 KB, application/pdf)
2022-02-07 12:20 UTC, Lukas Ruzicka
no flags Details

Description Lukas Ruzicka 2022-02-04 10:21:52 UTC
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

Comment 1 Lukas Ruzicka 2022-02-04 10:22:50 UTC
Created attachment 1859023 [details]
First page of result from gnome-text-editor

Comment 2 Lukas Ruzicka 2022-02-04 10:23:33 UTC
Created attachment 1859030 [details]
Second page of result from gnome-text-editor

Comment 3 Robert Marcano 2022-02-04 13:05:14 UTC
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.

Comment 4 Robert Marcano 2022-02-04 13:08:25 UTC
(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.

Comment 5 Lukas Ruzicka 2022-02-07 12:11:31 UTC
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

Comment 6 Lukas Ruzicka 2022-02-07 12:20:06 UTC
Created attachment 1859563 [details]
The spool file printed out of Gnome-Text-Editor

Comment 7 Fedora Blocker Bugs Application 2022-02-07 12:22:10 UTC
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

Comment 8 Geoffrey Marr 2022-02-07 21:01:36 UTC
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

Comment 9 Lukas Ruzicka 2022-02-08 13:39:32 UTC
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.

Comment 10 Robert Marcano 2022-02-08 13:49:17 UTC
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.

Comment 11 Lukas Ruzicka 2022-02-08 16:06:51 UTC
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.

Comment 12 Ben Cotton 2022-02-08 20:05:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 13 Robert Marcano 2022-02-11 13:07:44 UTC
Confirmed on my rawhide VM

Comment 14 Robert Marcano 2022-02-13 03:20:35 UTC
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.

Comment 15 Robert Marcano 2022-02-14 13:41:55 UTC
Submitted Bug #2054232 about the empty page added at the end.

Comment 16 Fedora Update System 2022-03-14 13:07:40 UTC
FEDORA-2022-64f198a523 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-64f198a523

Comment 17 Fedora Update System 2022-03-14 13:27:31 UTC
FEDORA-2022-b07e01cd7c has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b07e01cd7c

Comment 18 Fedora Update System 2022-03-14 20:38:55 UTC
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.

Comment 19 Fedora Update System 2022-03-14 23:44:39 UTC
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.

Comment 20 Fedora Update System 2022-03-22 03:41:33 UTC
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.

Comment 21 Fedora Update System 2022-03-26 15:21:31 UTC
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.


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