print a file in landscape from Windows command line or powershell -


i can happily print file using get-content e.g. :

get-content .\test.txt|out-printer "epson wp-4525 series"

how can in landscape?

can't in powershell on command line matter of sending correct escape code printer. printers support hp escape sequences that. see eg here basic list. can either echo characters directly printer, insert them in text file or send them through separate files. in last case can insert code

esc&l1o in file, eg landscape.prn, need code eject page printer esc&l0h. esc ascii 27 character, need save in editor capable of this, in notepad need save file unicode.

copying whole thing printer goes shared usb or network printer

copy /b landscape.prn+text.txt+eject.prn \\pcname\shared_printer_name 

or

copy /b landscape.prn+text.txt+eject.prn lpt1 

if use parallel printer or redirect lpt1

the /b copy in binary mode making sure characters passed.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -