J.R. Einhorn
20th May 2004, 17:12
I use Baan IVc2 with AIX 4.3.3 and our printers are all network printers on JetDirect "boxes". I've been trying to find a way to allow users to choose between 1-sided and 2-sided printing for reports that are sent to laserjet printers.
Currenty all our Baan print devices have Device Type = "direct", and then the Device Queue has a print command such as "/usr/bin/lp -d <unix_queue_name> -s -c -n%d %s", and the corresponding unix queues are in passthru mode.
I tried creating multiple unix queues for the same printer, one configured as simplex and the other as duplex, and then have two Baan print devices, one for each unix queue. This didn't help, and I'm not sure if it's because the simplex / duplex settings are ignored when the queue is in passthru mode, or because the setting on the printer overrides all else.
As an environmentalist, I'd really like to find a solution.
Many Thanks,
Janet Einhorn
victor_cleto
20th May 2004, 18:42
The lp command accepts the -o parameters to send specific printer commands that the device script (/etc/lp/interface) can understand, maybe this is the key to enforce double or single side printing.
I've seen mention of -o "-d" for double printing but also -o duplex|simplex for double|single sided print but never played with this myself... if you find something, please post the results.
I also found this page, maybe it will help understanding the -o options: http://www.physik.uni-regensburg.de/edv/phydrucker/net_lj4x.1.html
p.cole
20th May 2004, 19:55
One solution is to (mis)use the Barcode functionality to insert the required PCL characters to start double sided printing. This means you have to customise a report, but avoids creating separate Baan devices or UNIX queues.
Vamsi's solution should provide a starting point for this, I did this when we were running on AIX, but it's not a possible solution now we're running on Windows since everything goes via BwPrint.
http://www.baanboard.com/baanboard/showthread.php?s=&threadid=7119
It doesn't have to be this complicated, though. Just add a barcode to a report layout and edit the shell code for that specific barcode in $BSE/lib/printinf/h/<barcode name> (from memory)
J.R. Einhorn
20th May 2004, 21:40
Thanks to all who responded. Shortly after posting, I found a web link for HP LaserJet Printers - PCL Commands, Basic Page Formatting, and Font Selection: http://knot.pu.ru/faq/hprus/bpl.html
I tried using the -o option in the print command but it resulted in print errors.
I have not used the bar code functionality at all, so I decided to stay where I'm best acquainted. I created alternate drivers and added the appropriate escape sequences (found at last on the above web page) to the initpr and resetpr lines. This seems to do the trick. More testing will be needed but this seems to be a fairly simple way to manage.
J.R. Einhorn
r_nagu
25th June 2004, 17:40
Einhorn,
I am trying to setup the double-sided printing and came across this thread. It looks like you have this working. I tried to follow what you said, i.e., to modify the print driver to change the escape sequences in the initpr and resetpr but itÂ’s not working as I wanted it to. Could you please attach a sample driver file or just the changes you have made for double-sided printing? It will be of great help.
Appreciate your help.
Thanks,
NS
J.R. Einhorn
25th June 2004, 18:27
Hello NS,
I will attach four sample drivers (enclosed in a zip file). They are:
hplj4_ln_1s -- landscape mode, simplex (1-sided)
hplj4_ln_2s -- landscape mode, duplex (2-sided)
hplj4_pt_1s -- portrait mode, simplex (1-sided)
hplj4_pt_2s -- portrait mode, duplex (2-sided)
I hope this helps.
Regards,
Janet
r_nagu
25th June 2004, 19:07
Einhorn,
Works like a charm!
Thanks for your help,
NS
suhas-mahajan
26th June 2004, 07:28
Hi All,
How do I get this functionality on Windows, I am not able see printinf folder under lib folder.
Regards,
-Suhas
p.cole
28th June 2004, 00:01
There is no such functionality on Windows... all printing occurs via bwprint on the client machine.