DOS Printing in Landscape or Portrait

AliFox
AliFox used Ask the Experts™
on
Is there a command or way of printing an ASCII text file
to the printer in either Landscape or Portrait. I need to be able to do this by a DOS Command and do not want to have the user pressing buttons on the printer.

I have tried:-

1.   Type myfile.txt >lpt1
2.   Print myfile.txt >lpt1

but both formats always come out in Portrait.

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2007
Commented:
It depends on your printer. What I've done for an HP printer to print listings is to create a two data files that contain printer control sequences. The first does what I want to do (in my case print in compressed print) and the second reset the printer. Then I create a batch file that prints the file:

copy /A c:\util\compon.dat+%1+c:\util\compoff.dat PRN>NUL

Good Luck,
Steve

Author

Commented:
Thanks Steve,

2 Batch Files with control sequences to print in landscape and Portrait will suffice.

Although it isn't pretty, the mechanics of it will be disguised to end user.

Regards
AliFox

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial