Search code examples
printingprinter-control-language

Printing on lpt port from command prompt


I'm printing on an lpt port from the command prompt. Printer is hp2050 (pcl6). I use this command to print on port 1:

copy con lpt1

then I give it some text to print:

"Hello there!"

Then I "throw" the page (print it):

^Z (ctrl + Z)

But nothing happens. If I try it multiple times, and then print a test page, I see the text printed on the testpage. So only the page-throw doesn't work. However this works on a hp1000-DOS. Can anyone help, what the problem could be?


Solution

  • You need to send a form feed character (ASCII character 12) to eject the page instead of ^Z.
    If you add the following it should eject the page:

    copy ^L lpt1

    To enter the form feed character, type crtl+L or hold down the alt key and type 012.