OpenPrinting / OpenPrinting/libcupsfilters

[Regression 2.1.1 → 2.2.1] Copy count lost for uncollated jobs: no -dNumCopies, single copy printed

Open
#231 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17
Forks
71
Avg merge
2d 17h
Merged PRs (30d)
13

Description

Summary

Regression between 2.1.1 and 2.2.1: for an uncollated job with copies=2, the filter chain no longer produces 2 copies. Only a single copy is printed. Downgrading libcupsfilters 2.2.1 → 2.1.1 fixes it.

Environment (broken side)

  • Arch Linux (rolling), CUPS 2.4.19, cups-filters 2.0.1-2, Ghostscript 10.07.1, PAPPL 1.4.12, pappl-retrofit 1.0b2
  • libcupsfilters 2.2.1-2 → broken; libcupsfilters 2.1.1-4 (Arch archive build) → works
  • Same machine's Fedora 44 partition ships libcupsfilters 2.1.1-9.fc44 → works
  • Printer path: CUPS driverless queue → legacy-printer-app (PAPPL retrofit) on localhost:8000 → Konica Minolta 206 GDI driver (245igdirf) → USB. Driver PPD has *cupsManualCopies: False (printer claims hardware copies).
  • Client: gThumb 3.12.10 (also reproducible with plain lp -n 2, so not app-specific). gThumb sends uncollated copies (multiple-document-handling=separate-documents-uncollated-copies, Collate=False, copies=2).

Reproduction

lp -d <queue> -n 2 <1-page-file>

Only 1 copy prints with 2.2.1; 2 copies print with 2.1.1.

Evidence

PAPPL debug log, Ghostscript invocation with 2.2.1 (broken — note: no -dNumCopies, no page duplication):

gs ... -sDEVICE=cups ... -dMediaPosition=1 -dDEVICEWIDTHPOINTS=595 ... -f -_
[Job 36] Printing page 1, 1 copies

Same job type on Fedora's 2.1.1 (works — -dNumCopies=2 is passed):

gs ... -sDEVICE=cups ... -dMediaPosition=1 -dNumCopies=2 -dDEVICEWIDTHPOINTS=595 ... -f -_
[Job 108] Printing page 1, 2 copies

After downgrading Arch to 2.1.1, the same test emits two raster pages (Printing page 1, 1 copies + Printing page 2, 1 copies) and the captured backend data doubles (2315 → 4482 bytes) — i.e. 2.1.1 compensates with software page duplication while 2.2.1 does neither (no duplication, no NumCopies handoff).

Additionally, running pdftopdf (cups-filters 2.0.1 front-end over libcupsfilters) directly:

PPD=<driver-ppd> /usr/lib/cups/filter/pdftopdf 1 user test 2 "PageSize=A4 Collate=True" 1-page.pdf > out.pdf

out.pdf still has 1 page and carries no /NumCopies, with or without Collate=True/False.

Expected

With 2.2.1, an uncollated copies=2 job against a hardware-copies driver should either duplicate the pages in software or pass the count down (-dNumCopies=2 as 2.1.1 did) — currently the count is lost entirely.

Notes

  • Driver binary (245igdirf) is byte-identical on both sides (md5 89afcdfb969a11190c58bce408fc8aa8), PPDs identical, so the behavioral difference is entirely in libcupsfilters 2.1.1 → 2.2.1.
  • Happy to provide full PAPPL/CUPS debug logs for both versions on request.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with lp -d <queue> -n 2 <1-page-file> and compare the 2.1.1 and 2.2.1 filter behavior. Inspect the pdftopdf entry point and the logged Ghostscript invocation, using the supplied PPD and PAPPL logs as context. Done means uncollated copies are preserved through either software duplication or a copies handoff.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.