PCL: printing out partial page without ejecting

410 Views Asked by At

I want to be able to make my printer (HP DeskJet 1280 on USB) print out all raster data 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.

More precisely, I have two questions:

1) After sending some raster data to the printer (with Transfer Raster Data ("\033*b%dW")), how to make it print it out right away and stop, without ejecting the page?

2) After sending a vertical cursor positioning command with a positive argument (e.g., Vertical Cursor Positioning (Decipoints) ("\033&a%+dV")), how to make the printer advance the paper to the new position right away and stop there?

(Note that even solving only (1) would be almost sufficient, because advancing the cursor could be done indirectly by sending a blank raster of the appropriate height.)

Since PCL is a page description language, it could be actually impossible to do things at such a low level. But after an extensive search in the PCL documentation and the Internet, I have not yet found a definite negative answer either.

It seems that the printer has some kind of internal buffer to store its data, and that it flushes (i.e., prints out) that buffer when it grows large enough. If there were a command to tell the printer to flush that buffer immediately without doing anything else, everything would be fine. But I have not found such a command. Even "\033*rC" (End Raster Graphics) has no immediate effect.

I am using CUPS' USB backend to communicate with the printer, and have verified (using usbmon) that the backend actually sends all my commands to the printer as soon as it sees them, so it cannot be the issue of data getting stuck in the driver.

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

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

0

There are 0 best solutions below