cfFilterPDFToPDF fails on single-copy HP USB queue: "tempfilename wasn't created"

Open
#260 1 comment 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
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
backend

Research direction

Start by reproducing the one-copy PDF or CUPS test-page job with libcupsfilters 2.2.1 and compare its logs with the successful 2.1.1-4.4 run. Trace the pdftopdf filter path around “tempfilename wasn't created” and the empty input passed to cfFilterGhostscript. Done means the same HP USB queue completes a one-copy job and records one page without the failure.

Written by the indexing model from the issue text.

Description

Summary

Printing a one-copy PDF or CUPS test page to an HP Color LaserJet MFP M282/M285 fails in pdftopdf with tempfilename wasn't created. The job reaches the CUPS filter chain, but no page is produced.

Downgrading libcupsfilters from 2.2.1 to 2.1.1-4.4 made a subsequent one-page test job complete successfully in CUPS. This appears separate from #227/#228, which concern losing requested copies when printing multiple copies.

System

  • OS: CachyOS, x86_64
  • CUPS: 2.4.19
  • cups-filters: 2.0.1-3.1
  • libcupsfilters: 2.2.1.r23.gdee3b387-1.1 (CachyOS package)
  • libppd: 2.1.1-2.1
  • Ghostscript: 10.08.0
  • HPLIP: 3.26.6-1.1
  • Printer: HP Color LaserJet MFP M282/M285, connected over USB

CUPS queue device URI uses the hp:/usb/ backend. The failing jobs requested one copy.

Steps to reproduce

  1. Configure the HP USB printer as a CUPS queue.
  2. Submit a PDF or the CUPS test page with copies set to 1.
  3. Check /var/log/cups/error_log.

Actual result

The job fails during PDF conversion. Representative log messages:

[Job 35] tempfilename wasn't created
[Job 35] pdftopdf filter function failed.
[Job 35] PID ... (/usr/lib/cups/filter/pdftopdf) stopped with status 1.
[Job 35] cfFilterGhostscript: Input is empty, outputting empty file.

The hp backend exits without an error, but the job produces no page.

Expected result

The filter chain completes and sends the page to the printer.

Comparison after downgrade

I downgraded only libcupsfilters to 2.1.1-4.4 and submitted /usr/share/cups/data/testprint to the same queue. CUPS recorded the job as completed, and page_log recorded one page. The previous 2.2.1 jobs failed with the pdftopdf error above.

Could this be a regression in the 2.2.1 PDF-to-PDF filter path? I can provide a sanitized debug log and queue PPD if useful.

Dominant language
C
Stars
20
Forks
89
Avg merge
13h 37m
Merged PRs (30d)
50

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/libcupsfilters

All issues in OpenPrinting/libcupsfilters

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.