HP LaserJet 1200: every bundled driver except pxlmono prints endless "ERROR: undefined" pages on cups-filters 2.x; root cause: JCL handling split

Đang mở
#64 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
backend

Hướng nghiên cứu

Start by reviewing the attached working reference PPD, LJ1200-PCL5-PJL-FINAL2.ppd, and the foomatic-rip debug logs comparing the working and broken chains. Reproduce the PDF and PostScript filter paths with cups-filters 2.0.1 and foomatic-rip, then trace where the PJL wrapper is lost. Done means the LaserJet 1200 receives the PCL personality switch and prints correctly without the endless error pages.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Title
HP LaserJet 1200: every bundled driver except pxlmono prints endless
"ERROR: undefined" pages on cups-filters 2.x; root cause: JCL handling split
between pdftops and foomatic-rip (jobhasjcl bypass) + missing PJL personality
switch; pxlmono works but takes minutes per page.

Environment
Distro: <Manjaro/Arch, версия>, cups <версия>, cups-filters 2.0.1, ghostscript 10.x
Printer: HP LaserJet 1200 (2002), USB. Languages: PCL5e, PCL6; PostScript
interpreter active by default; requires PJL switch "ENTER LANGUAGE = PCL"
to enter PCL.
Symptoms
Gutenprint PCL drivers, foomatic ljet4/lj4dith, "raw" ljet4: printer outputs
endless sheets with a single "ERROR: undefined" line (PostScript interpreter
consuming PCL data).
Foomatic/Postscript, Generic PS: endless PostScript error sheets.
pxlmono: only driver producing correct pages, but minutes per page.
Root cause (verified on real binaries)
No bundled PCL driver emits the PJL personality switch
"ESC%-12345X@PJL ENTER LANGUAGE = PCL" + trailing UEL, so PCL data is fed
to the PS interpreter.
For foomatic PPDs carrying JCL keys the chain
pdftopdf -> pdftops -> foomatic-rip breaks the JCL twice over:
pdftops also reads the PPD and injects the PJL into its PostScript;
foomatic-rip receives input not starting with %!PS, sets jobhasjcl=1 and
skips its own JCL wrapper;
the injected PJL never reaches the device stream (consumed by the
rendering stage), so the ljet4 PCL output goes out without any PJL.
Reproduced with cups-filters 2.0.1 (Arch) and foomatic-rip 1.28.17 (Debian)
and 2.0.1 (Arch); foomatic-rip debug logs show "JCL:
%-12345X@PJL ENTER LANGUAGE = PCL" planned but absent from the device bytes.
Minimal working fix (reference PPD, 2 KB, "HP LaserJet 1200 ljet4+PJL (PCL5 fast)")
Remove all JCL keys from the PPD (no other component can inject PJL).
Embed PJL directly in FoomaticRIPCommandLine (executed only by foomatic-rip
via sh -e -c):
*FoomaticRIPCommandLine: "printf '\033\045-12345X@PJL ENTER LANGUAGE = PCL\n';
gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -dNOMEDIAATTRS -dNOINTERPOLATE
-sDEVICE=ljet4%B%A%Z -sOutputFile=-%C -f -; printf '\033\045-12345X'"
Add direct PDF filter line (as Debian's pxlmono PPD already does):
*cupsFilter: "application/vnd.cups-pdf 0 foomatic-rip"
so PDF bypasses pdftops entirely.
Verified: libcups ppdOpenFile; foomatic-rip 1.28.17 and 2.0.1; full PDF and PS
chains produce byte-identical device output with the PJL entry; real-world
print 5-10 s/page (pxlmono: ~20 min/page; all others: endless error pages).
Suggested upstream fixes
cups-filters/foomatic-rip: do not let the jobhasjcl heuristic drop the JCL
wrapper when no JCL actually reached the device; and/or pdftops should not
inject JCL when the following filter is foomatic-rip.
foomatic-db: add PJL init to the HP LaserJet 1200 / LaserJet 4 family PCL
entries (reference PPD attached).
Attachments
LJ1200-PCL5-PJL-FINAL2.ppd (2 KB, working reference)
foomatic-rip debug logs: working vs broken chain (jobhasjcl bypass)

printer_LJ1200_report_20261105.md
LJ1200-upstream-bug-draft.md

Ngôn ngữ chính
HTML
Star
14
Fork
26
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenPrinting/foomatic-db

Tất cả issue của OpenPrinting/foomatic-db

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.