Proxy mode: pdftopdf filter chain adds start/end banner pages although job-sheets=none,none everywhere

Open
#797 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

Research direction

The report identifies the filter chain as texttopdf → pdftopdf → proxy and says the PDF already has three pages before reaching the print server. Start by tracing banner-page handling in the snap’s pdftopdf/JCL filter path and how it interprets job-sheets=none,none. Done means a normal PDF job through proxy mode arrives with its original page count and no added banners; the report provides reproduction commands and logs.

Written by the indexing model from the issue text.

Description

Proxy mode: pdftopdf filter chain adds start/end banner pages although job-sheets=none,none everywhere

Environment
  • Ubuntu 24.04 LTS, system CUPS (deb) 2.4.7-1.2ubuntu7.14
  • CUPS snap 2.4.20-1 (rev 1277, latest/stable; latest/candidate currently points to the same revision)
  • CUPS snap running in proxy mode (proxy://%2Frun%2Fcups%2Fcups.sock/<queue>)
  • Setup: client system CUPS queues point via IPP to a central CUPS print server
Problem

Every job submitted through the CUPS snap gets an extra page before and after the document. The extra page shows Title: Untitled, User: Guest, Pages: 1. This happens with snapped Chromium (also via the GTK system dialog) and with cups.lp. It does not happen when printing with lp against the system CUPS, or from Firefox. The banner text is identical on all printer models (HP, Kyocera, Lexmark).

Findings
  • JobSheets none none for all queues in /var/snap/cups/common/etc/cups/printers.conf, in the client's system CUPS and on the print server
  • No Classification in any cupsd.conf; no job-sheets in any lpoptions file
  • Snap debug log shows job-sheets=none,none and no Adding start banner page line. Filter chain for a text job: texttopdf → pdftopdf → proxy (plus ppdFilterEmitJCL)
  • The client's system CUPS runs no filters, only the ipp backend
  • The PDF arriving at the print server (PreserveJobFiles=yes) already has 3 pages (banner, document, banner), so the pages are created inside the snap
  • cups.lp -d <queue> -o raw test.pdf (1-page PDF) prints 1 page; without -o raw the same file prints 3 pages. The banners are therefore generated in the snap's filter chain (pdftopdf/JCL step), not in the proxy backend
Steps to reproduce
  1. Ubuntu 24.04 with deb CUPS and the CUPS snap in proxy mode, with a queue pointing to a remote CUPS server
  2. cups.lp -d <queue> test.pdf with a 1-page PDF
  3. 3 pages are printed
Expected behavior

1 page, no banners, since job-sheets is none,none everywhere.

Logs (anonymized)

Snap Job 30 corresponds to system CUPS Job 77 (Chromium), snap Job 31 corresponds to system CUPS Job 78 and print server Job 113 (cups.lp test).

1. CUPS snap on client, test job via cups.lp (Job 31)

D [09/Nov/2026:12:39:44 +0100] [Job 31] job-sheets=none,none
D [09/Nov/2026:12:39:44 +0100] [Job 31] argv[5]="cups-proxyd finishings=3 job-cancel-after=10800 job-priority=50 job-sheets=none,none number-up=1 print-color-mode=monochrome printer-uuid=urn:uuid:<uuid> job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1794224384 time-at-processing=1794224384 job-impressions-completed=0 document-name-supplied=hostname ColorModel=Gray cupsPrintQuality=Normal"
I [09/Nov/2026:12:39:44 +0100] [Job 31] Started filter /snap/cups/1277/lib/cups/filter/texttopdf (PID 4746)
I [09/Nov/2026:12:39:44 +0100] [Job 31] Started filter /snap/cups/1277/lib/cups/filter/pdftopdf (PID 4747)
I [09/Nov/2026:12:39:44 +0100] [Job 31] Started backend /snap/cups/1277/lib/cups/backend/proxy (PID 4748)
D [09/Nov/2026:12:39:44 +0100] [Job 31] ppdFilterEmitJCL: Filter function (PID 4749) started.

2. CUPS snap on client, job from snapped Chromium (Job 30)

D [09/Nov/2026:12:34:21 +0100] [Job 30] job-sheets=none,none
D [09/Nov/2026:12:34:21 +0100] [Job 30] argv[5]="printer-state-reasons=none printer-is-accepting-jobs Resolution=1200dpi PageSize=A4 noprinter-is-shared job-priority=50 printer-location=<location> marker-change-time=0 Duplex=None Collate device-uri=proxy://%2Frun%2Fcups%2Fcups.sock/PRINTER1 printer-state=3 printer-uri-supported=ipp://localhost/printers/PRINTER1 ColorModel=Grayscale job-cancel-after=10800 print-color-mode=monochrome printer-type=2134086 cups-proxyd printer-commands=none printer-state-change-time=1794222699 job-sheets=none,none noprinter-is-temporary number-up=1 finishings=3 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1794224061 time-at-processing=1794224061 job-impressions-completed=0"

3. System CUPS (deb) on client: no filters, only ipp backend (Jobs 77/78)

D [09/Nov/2026:12:34:21 +0100] [Job 77] job-sheets=none,none
D [09/Nov/2026:12:34:21 +0100] [Job 77] argv[5]="job-originating-user-name=unknown Collate ColorModel=Grayscale cups-proxyd Duplex=None finishings=3 job-cancel-after=10800 job-originating-host-name=localhost job-priority=50 job-sheets=none,none number-up=1 PageSize=A4 print-color-mode=monochrome Resolution=1200dpi job-uuid=urn:uuid:<uuid> date-time-at-creation= date-time-at-processing= time-at-creation=1794224061 time-at-processing=1794224061 job-impressions-completed=0 cupsPrintQuality=Normal"
I [09/Nov/2026:12:39:44 +0100] [Job 78] Started backend /usr/lib/cups/backend/ipp (PID 4751)

4. Print server, same test job (Job 113, timestamps in UTC)

I [09/Nov/2026:11:39:44 +0000] [Job 113] Adding start banner page "none".
I [09/Nov/2026:11:39:44 +0000] [Job 113] Adding end banner page "none".
D [09/Nov/2026:11:39:44 +0000] [Job 113] job-sheets=none,none
I [09/Nov/2026:11:39:44 +0000] [Job 113] Started filter /usr/lib/cups/filter/pdftopdf (PID 235418)
I [09/Nov/2026:11:39:44 +0000] [Job 113] Started filter /usr/lib/cups/filter/pdftops (PID 235419)
I [09/Nov/2026:11:39:44 +0000] [Job 113] Started filter /usr/lib/cups/filter/hpps (PID 235420)
I [09/Nov/2026:11:39:44 +0000] [Job 113] Started backend /usr/lib/cups/backend/socket (PID 235421)

5. Document as received by the print server (PreserveJobFiles=yes)

$ pdfinfo <spoolfile> | grep Pages
Pages:           3
$ pdftotext <spoolfile> - | head
Title: Untitled
User: Guest
Pages: 1

<document content>

Title: Untitled
User: Guest
Pages: 1

6. Raw test via snap

$ cups.lp -d PRINTER1 -o raw test.pdf     # 1-page PDF -> 1 page printed
$ cups.lp -d PRINTER1 test.pdf            # same file  -> 3 pages printed
Dominant language
C
Stars
202
Forks
161
Avg merge
14h 4m
Merged PRs (30d)
34

Getting set up

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.

More from OpenPrinting/cups-filters

All issues in OpenPrinting/cups-filters

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.