Re: hplip-printer-app hangs and oddities (Re: Cups automatic duplex printing problems)
Michael Sweet <[email protected]> Thu, 11 Jul 2024 07:52:47 -0400
| Newsgroups | dev.linux.lists.printing-users |
|---|---|
| Message-ID | <[email protected]> |
Valentijn, If this affected all PS printers we would have heard about it a long = time ago. I will see if I can determine what is going wrong - the whole build = process for this printer application will make debugging challenging... = :/ > On Jul 9, 2024, at 4:19=E2=80=AFAM, Valentijn Sessink = <[email protected]> wrote: >=20 > Hi Michael, hello list, >=20 > On 09-07-2024 00:21, Michael Sweet wrote: >> Does the PPD file in question have any JCL options (look for = JCLOpenUI)? >=20 > Yes it does (please see bug report, sorry it wasn't clickable due to = the missing "h"). For your convenience: > https://github.com/OpenPrinting/hplip-printer-app/issues/17 >=20 >> It is possible that the JCL code is missing a trailing newline which = could cause this - in which case we should append one to make sure the = JCL code doesn't prevent language switching... >=20 > Nope, there actually is a <0A> at the end, I did check that. >=20 > But please note that the %% is at the *beginning* of a PJL line, i.e. = there are postscript comments already, where PJL is still being sent to = the printer: >=20 > =C2=B7%-12345X@PJL > @PJL JOB NAME =3D "Test Page" DISPLAY =3D "4 valentyn Test Page" > @PJL SET USERNAME =3D "valentyn" > %%@PJL ENTER LANGUAGE =3D PostScript > %!PS-Adobe-3.0 >=20 > I can't figure out the code path. But if I change the code at the end = of ppdEmitJCL() to: >=20 > ppdEmit(ppd, fp, PPD_ORDER_JCL); > fputs(ppd->jcl_end, fp); > fputs(ppd->jcl_ps, fp); >=20 > ... _and_ change the PPD file to say: > *JCLEnd: "END-OF-TASK<0A>" >=20 > ... then the output to the printer says: >=20 > @PJL SET USERNAME =3D "valentyn" > %%END-OF-TASK > @PJL ENTER LANGUAGE =3D PostScript > %!PS-Adobe-3.0 >=20 > So somewhere, something says "%%" to the printer, while there is still = some PJL to be sent. But as said: I can't figure out the code path. >=20 > I can't think of anything else to try. Tried to get DEBUG_printf to = work but my grasp of the whole cups/filtering stuff is too small to = actually be able to get that to work. Also, "debian/rules clean" for = some reason messes up the code base and I'm sort of unable to rebuild = cleanly without re-unpacking the debian source. But that's all in the = category of "I'm not an actual programmer" so you shouldn't bother. >=20 > But it is an actual bug that could potentially bug all printers with a = ppd file that has PJL commands. >=20 > Best regards, >=20 > Valentijn > --=20 > Durgerdamstraat 29, 1507 JL Zaandam; telefoon 075-7100071 >=20 ________________________ Michael Sweet