Win98/HP Printer problem. Partially Solved.

Leslie (Les) M Barstow barstlm at
Fri Jul 16 16:56:10 GMT 1999

Darrin M. Gorski <dgorski at> scribbled:
> Message-ID: <199907152147.RAA26043 at>

> On Fri, 16 Jul 1999, Kevin Everets wrote:
> > ^L^[E^[%-12345X

> ^L is a formfeed
> ^[ is an escape, (which I'll write as [ESC] to ease reading)
> [ESC]E is a PCL RESET command
> [ESC]%-12345X is a PJL prefix (usually followed by a command), for
> example:
> [ESC]%-12345X at PJL EOJ
> is a PJL end of job command, which tells the printer to prepare for
> the next job;

Actually, the [ESC}%-12345X is the PJL RESET command, the equivalent of
PCL reset command just issued.

HP indicates you can (should?) put both of these commands at the
and end of your job, to ensure the pure state of the printer's

By issuing a PJL RESET, you force the printer back to its configured
you also place the printer back in a mode to accept PJL commands,
allowing the
example above.

> Anyway, it looks to me like the entire job is not making it to samba, as
> the PJL command is missing.

No, this is the standard ending for a job.  Almost no-one uses the EOJ
command when outputting PJL/PCL.  It could be that PCL interpreters will
ignore the PJL RESET command (because the format is within PCL specs),
will not ignore real text (such as the '@PJL EOJ' line) if they don't
what to do with it.

In any event, neither of these should technically spit out a page, but
it is possible that the PJL RESET could be misinterpreted by an older
printer such as the LJ4, causing it to think its write buffer was no
empty, and prompting the extra page.  If you have set up the printer
to accept LF as CR, then the trailing CR in the job (there should be
may also be causing the extra page.

> > To get around the little extra page problem, I just popped a filter into
> > the printcap file which runs sed and removes the extra garbage.

Try limiting the filter to removing the [ESC]%-12345X at the end.  Make
you don't remove the one at the beginning - it's useful.

More information about the samba mailing list