tootsie
14th August 2002, 03:22
Hello Rich,
I don't know if you are still looking for a solution.
It is relatively simple to accomplish this an also if you want to print a report in landscape or change the standard lettertype. Changing the initialisation setting of the printerdriver and defining a new printer in Baan does the job.
For changing the drawer on an HP Printer:
Login as user bsp
Go to directory $BSE/lib/printinf/h for drivers HP printers
Make a copy of the file $BSE/lib/printinf/h/hp_lj4 to $BSE/lib/printinf/h/hp_lj4_2
Open this file with VI or another editor
The standard initialisation settings of the printer are unter the heading "Setup" in the the file $BSE/lib/printinf/h/hp_lj4
############################################################################################
# Setup
############################################################################################
initpr=\EE\E&126a66F\E(12U)\E(s10H)\El5H\E(s)p10h0s0b4099T\E&k11.6H,
Change the code El5H in the $BSE/lib/printinf/h/hp_lj4_2 file to El1H and the second drawer will be selected.
Initpr will the look like this:
initpr=\EE\E&126a66F\E(12U)\E(s10H)\El1H\E(s)p10h0s0b4099T\E&k11.6H,
Then save this file as $BSE/lib/printinf/h/hp_lj4_2
Now got to session ttaad3100m000 and make a copy of the printer You are using in Baan with CTRL c.
Rename Device 1 into 1B and change the driver in hp_lj4_2
See screenprints
now for printing of sales invoices use printer 1,
for printing purchase orders use printer 1b
ttaad3100m000 begin set single-occ (1) Form 1-1
R,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,T
. Devices muteren .
5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Device : 1 .
. Omschrijving : HP Laserjet 4 portrait .
. Type printer : Direct .
. Locale : ISO-8859-1 Western Europe - 8 bit .
5,,Printer ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Driver : hp_lj4 .
. Programma : lp -c -ddumb_1 -n%d -s %s .
. Papiertype : A4 A4 format .
. Linker marge : 0 Formfeed : Nee .
5,,Bestand ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Driver : .
. Programma : .
. 4GL-Programma : .
. Argument : .
. Pad : .
. Wijzigen toegest.: .
. Bladlengte : 0 .
. Uw keuze: .. .
F,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,G
ttaad3100m000 single-occ (1) Form 1-1
R,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,T
. Devices muteren .
5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Device : 1B .
. Omschrijving : Hewlett Packard LaserJet 4 briefhoofd .
. Type printer : Direct .
. Locale : ISO-8859-1 Western Europe - 8 bit .
5,,Printer ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Driver : hp_lj4_2 .
. Programma : lp -c -ddumb_1 -n%d -s %s .
. Papiertype : A4 A4 format .
. Linker marge : 0 Formfeed : Nee .
5,,Bestand ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Driver : .
. Programma : .
. 4GL-Programma : .
. Argument : .
. Pad : .
. Wijzigen toegest.: .
. Bladlengte : 0 .
. Uw keuze: .. .
F,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,G
For printing landscape make a copy of the file $BSE/lib/printinf/h/hp_lj4 to $BSE/lib/printinf/h/hp_lj4_lndsc
and change to the bold code.
############################################################################################
# Setup
############################################################################################
initpr=\EE\E&l1o5.45c26a66F\E(12U)\E(s10H)\El1H\E(s)p10h0s0b4099T\E&k11.6H,
ttaad3100m000 single-occ (1) Form 1-1
R,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,T
. Devices muteren .
5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Device : 1L .
. Omschrijving : Hewlett Packard LaserJet 4 Landscape .
. Type printer : Direct .
. Locale : ISO-8859-1 Western Europe - 8 bit .
5,,Printer ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Driver : hp_lj4_lndsc .
. Programma : lp -c -ddumb_1 -n%d -s %s .
. Papiertype : A4 A4 format .
. Linker marge : 0 Formfeed : Nee .
5,,Bestand ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,6
. Driver : .
. Programma : .
. 4GL-Programma : .
. Argument : .
. Pad : .
. Wijzigen toegest.: .
. Bladlengte : 0 .
. Uw keuze: .. .
F,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,G
You can do the same for printing landscape from drawer 2 making a printer 1L2 with driver hp_lj4_2_lndsc.
Hope this helps you.
Henk