Empty print output for PostScript printers which need reverse output order

Bug #2022943 reported by Till Kamppeter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libppd (Ubuntu)
Fix Released
High
Unassigned
Lunar
Fix Released
High
Unassigned
Mantic
Fix Released
High
Unassigned

Bug Description

This bug was originally reported upstream as

    https://github.com/OpenPrinting/libppd/issues/20

The reporter uses Fedora 38, besides Ubuntu 23.04 the second distro using cups-filters 2.x and libcupsfilters 2.x. As I am able to reproduce the bug on Ubuntu 23.04 and it is a problem many users could run into (it especially happens with driverless IPP printers) I post this bug report as base for an SRU in 23.04.

What happens here is that on certain printers the job output sent off to the printer is completely empty, zero bytes. This happens for all PostScript printers (and printers with proprietary drivers which require PostScript input, like for example Brother) which stack the pages face-up and therefore need to output the pages in reverse order.

The PPD files of the affected printers contain the following line

*DefaultOutputOrder: Reverse

and they either do not have a "*cupsFilter; ..." or "*vupsFilter2: ..." line (PostScript printer PPDs from the printer manufacturers) or they have such a line, specifying "application/vnd.cups-postscript" (PostScript) as destination format.

I have already fixed the bug upstream in libppd via

    https://github.com/OpenPrinting/libppd/commit/2afb353e27b

[ Impact ]

This bug does not only affect Brother printers used with Brother's proprietary printer drivers, but also a good amount of PostScript printers, as mentioned all those which stack the paper face-up and therefore need to output the pages in reverse order.

[ Test Plan ]

Download the attached sample PPD file, a file to use the Brother DCP-J125 with Brother's proprietary printer driver. Also have a PDF file handy.

No printer is required for the tests, simply check size and content of the output file out.ps.

Run the following command:

cupsfilter -P DCPJ125.ppd -m application/vnd.cups-postscript file.pdf > out.ps

Then

ls -l out.ps

shows you that it is empty. With the proposed SRU package installed the file is not empty and

file out.ps

tells you that you have a PostScript file. Both "evince" and "gs" are able to display the file and it should look the same as the original PDF input file.

Also printing image files (JPG, PNG, TIFF) is affected. Test command line:

PPD=DCPJ125.ppd /usr/lib/cups/filter/imagetops 1 1 1 1 '' ~/file.jpg > out.ps

[ Where problems could occur ]

The patch is rather long, as on the conversion of the former "pstops" CUPS filter into the ppdFilterPSToPS() filter function function calls were replaced at too many places by other function calls. The wrong replacements got corrected with the fix. The fix got tested with both affected and not affected PPD files and with different parameters (like multiple copies, also with PPD of printers which require manual copies).

Any regression affects only PostScript printers or printers with drivers which need PostScript as input. Other printers do not use the ppdFilterPSToPS() filter function.

Changed in libppd (Ubuntu):
importance: Undecided → High
Changed in libppd (Ubuntu Lunar):
importance: Undecided → High
description: updated
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libppd - 2:2.0~rc1-0ubuntu2

---------------
libppd (2:2.0~rc1-0ubuntu2) mantic; urgency=medium

  * fix-mirrored-printout-when-ppd-has-mirrorprint-option.patch: When
    converting PPDs with “MirrorPrint” option into IPP attributes, setting
    of the option (“True”/“False”) was not considered, making printouts
    always come out mirrored (LP: #2018504).
  * fix-resolution-handling-on-ppd-to-ipp-attr-conversion.patch: For
    PPDs for driverless printers which take jobs in Apple/PWG Raster
    format always the lowest supported resolution got selected, regardless
    of the PPD default or job option settings (LP: #2022929).
  * ppdfilterpstops-fix-printers-with-reverse-output-order.patch:
    Printouts to PostScript printers (or printers with drivers which need
    PostScript input) which drop the pages face-up and therefore need to
    print in reverse order came out empty (Upstream issue #20,
    LP: #2022943).

 -- Till Kamppeter <email address hidden> Mon, 5 Jun 2023 19:46:27 +0200

Changed in libppd (Ubuntu Mantic):
status: New → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Till, or anyone else affected,

Accepted libppd into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libppd/2:2.0~rc1-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libppd (Ubuntu Lunar):
status: New → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (libppd/2:2.0~rc1-0ubuntu1.1)

All autopkgtests for the newly accepted libppd (2:2.0~rc1-0ubuntu1.1) for lunar have finished running.
The following regressions have been reported in tests triggered by the package:

libppd/2:2.0~rc1-0ubuntu1.1 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/lunar/update_excuses.html#libppd

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded libppd 2:2.0~rc1-0ubuntu1.2 to fix the mentioned failing autopkgtest. The binary packages produced by it are absolutely identical with 2:2.0~rc1-0ubuntu1.1.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Installed libppd 2:2.0~rc1-0ubuntu1.1 from lunar-proposed. This fixes the bug as of the results of running the commands under [ Test Plan ] above.

Note that the binary packages produced by libppd 2:2.0~rc1-0ubuntu1.1 and 2:2.0~rc1-0ubuntu1.2 are identical, as the only difference between the packagges is in the autopkgtest script.

tags: added: verification-done verification-done-lunar
removed: verification-needed verification-needed-lunar
Revision history for this message
Sebastien Bacher (seb128) wrote :

Triggering libppd with migration-reference/0 also failed so that's not a regression

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libppd - 2:2.0~rc1-0ubuntu1.1

---------------
libppd (2:2.0~rc1-0ubuntu1.1) lunar; urgency=medium

  * fix-mirrored-printout-when-ppd-has-mirrorprint-option.patch: When
    converting PPDs with “MirrorPrint” option into IPP attributes, setting
    of the option (“True”/“False”) was not considered, making printouts
    always come out mirrored (LP: #2018538).
  * fix-resolution-handling-on-ppd-to-ipp-attr-conversion.patch: For
    PPDs for driverless printers which take jobs in Apple/PWG Raster
    format always the lowest supported resolution got selected, regardless
    of the PPD default or job option settings (LP: #2022929).
  * ppdfilterpstops-fix-printers-with-reverse-output-order.patch:
    Printouts to PostScript printers (or printers with drivers which need
    PostScript input) which drop the pages face-up and therefore need to
    print in reverse order came out empty (Upstream issue #20,
    LP: #2022943).

 -- Till Kamppeter <email address hidden> Tue, 6 Jun 2023 08:59:59 +0200

Changed in libppd (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for libppd has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Steve Langasek (vorlon) wrote : Proposed package upload rejected

An upload of libppd to lunar-proposed has been rejected from the upload queue for the following reason: "This needs a new SRU bug about the autopkgtest regression for tracking; changelog currently only points to already-closed bugs".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.