[cups-devel] low level operation with PCL?

Toomas Rosin toomas at rosin.ee
Sat Mar 21 07:45:31 PDT 2015


Hello!

I know that PCL is a page description (not low-level) language, and so
it is perhaps no surprise that I cannot do what I would like to.  But
after an extensive search in the Internet and the PCL documentation, I
have not yet found a definite negative answer either.  Here is my
problem:

I cannot figure out how to make my printer (HP DeskJet 1280 on USB)
show me everything I have sent to it so far, *without ejecting the
page*.  I am sending only plain raster graphics and cursor positioning
commands --- no vector graphics, no text.

It seems that the printer has an internal buffer to store the data,
and that it flushes (i.e., prints out) that buffer after it has grown
above some level.  And there seems to be no way to tell it to flush it
immediately, without doing anything else.  Even "\033*rC" (End Raster
Graphics) has no immediate effect.

I use CUPS' USB backend to communicate with the printer, and have
verified (with usbmon) that the backend really sends all my data to
the printer as soon as I give them to it, so it cannot be the issue of
data getting stuck in software.

Commands that print out partial pages include "\033E" (Printer Reset),
"\033%%-12345X" (Universal Exit Language), "\033&r1F" (Flush All Pages
(including partial pages)) --- but all of them have the side-effect of
ejecting the page.

What I would like to achieve is this: 1) After I have sent some raster
data to the printer (with Transfer Raster Data ("\033*b%dW")), be able
to make it print it out right away and stop, without ejecting the
page.  2) After I send a vertical cursor positioning command (e.g.,
Vertical Cursor Positioning (Decipoints) ("\033&a%+dV")), be able to
make the printer advance the paper to the new position right away, and
stop there.

Can somebody confirm my impression that what I want is an absolute
impossibility, or perhaps suggest a clever way to do it?

Thanks in advance,
T.



More information about the cups mailing list