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

Abierto
#64 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
HTML
Estrellas
14
Forks
26
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenPrinting/foomatic-db

Todos los issues de OpenPrinting/foomatic-db

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.