Page 1 of 1

Landscape Printing

Posted: Tue May 29, 2012 11:46 am
by gordon
I have to print some custom forms in landscape orientation. So I setup DIRECT and PREVIEW printers with an INIT string that sets orientation.
This allows the user to change the orientation by selecting the appropriate printer.

But setting up a different INIT string wasn't easy. In essence you need a different printer type that references a whole different set of printer control statements. So I made a PRINTER.LANDSCAPE.SYS that defines printer types NWPL and PCLL. The only thing different between this file and PRINTER.SYS were the printer INIT strings.

Next I assigned my landscape DIRECT and PREVIEW printers to PCLL and NWPL printer types. But the question arose how to distinguish the landscape printer definitions from the portrait definitions <i>for the same printer</i>. So for printer X I needed two PRINTER TYPE statements that pointed to printer WIN:/X. I did this by assigning a queue value to my printer definitions and referencing the queue name in my printer type statements as follows:

Code: Select all

substitute prn:/10 preview:10/default
substitute prn:/20 preview:20/select
substitute PRN:/30 DIRECT:30/default
substitute PRN:/40 DIRECT:40/default
substitute prn:/50 preview:50/default

printer type NWP select 10
printer type NWP select 20
printer type PCL select 30
printer type PCLL select 40
printer type NWPL select 50
Printers 4 and 5 are landscape.