Rich Kijanka
23rd August 2001, 19:52
Has anyone modified a Baan script or developed an application to send output to a laser printer and pull paper stock from a specific drawer in the printer ?

I would like to send output from either the invoice print session or purchase order print session to a single laser printer that contains 2 drawers. In one drawer there will be paper stock to print invoices on and a second drawer which will contain paper stock to print purchase orders. If the invoice printer sends output to the printer, the paper stock needs to be pulled from the first drawer and if the purchase order printer sends output to the printer, the paper stock needes to be pulled from the second drawer.

Has anyone done this ?

Does anyone have any suggestions on how this can be done ?

Any information related to this will be appreciated.

Regards
Rich

patvdv
23rd August 2001, 23:34
Hi Rich,

I can't say I know an add-on application that can do the trick but with some hacking in the printer drivers scripts you can accomplish the same thing.

The idea is to find a printer driver amongst the default Baan printer drivers which works for you, for e.g. the printer's default tray. Let's say this driver would be hp_lj4. You can then copy the printer drive file in $BSE/lib/printinf/h to another file and rename it to e.g. hp_lj.tray2.

Then comes the hard bit: you must hack the copied driver file to have it send the output to the designated tray by using the appropriate ESC or PCL codes. The ESC codes you should find in the technical manual of your printer. In the script you will find some hints as to which parameter you must change the ESC codes for.

Finally, you create 2 devices in the session Maintain Device Date with each one linked to one of the hp_lj4 drivers files

E.g.

Device: HPLJ4_DEF
Driver: hp_lj4

Device: HPLJ4_TRAY2
Driver: hp_lj4.tray2

etc.

You can then use the preferred device in each of your printing sessions.

Alternatively, some of the printing scripts support the -o tray(x) options but it only works if you use Baan devices of type direct and not the default printer. In the first case, you circumvent the Baan printer daemon and send all jobs straight to UNIX spooler queue.

Hope it helps some.

pjohns
24th August 2001, 11:23
Rich,

You can also set switches on the SI and PI layout fields or you can create/edit the report script.

See the above solution for details

Good Luck!

PJ

Ravenscross
24th August 2001, 11:35
Believe me gang this is far easier in NT! Similar to the solution of the printer drivers, but without the hassle of hacking them. You just create the designated printer in NT, easy to set up and then in Baan. Then just automate the printout to go to the right drawer

pjohns
24th August 2001, 11:36
lol

PJ

Ravenscross
24th August 2001, 11:41
Okay, true. But it does show that sometimes there are nuggets in a mountain of sand