Danny Leolux
12th December 2006, 12:18
Hi Everybody,

We have just installed new multi-functional printers and want to use the 'printing on demand' functionality these machines provide. When printing documents from any of the Office applications this workes perfectly. The output is 'buffered in the memory of the printer' and only comes out when the user gives the instruction to do so once he/she is at the printer.

When the same user prints Baan data to the same printer this doesn't work. The output is printed immediatly. This leades to extra time spend at the printer looking through all the printed documents in search of their own.

Does anyone have any experience with 'printing on demand' from Baan?
Are there any PCL drivercodes that can support this functionality?

Thanks in advance,
Danny

Markus Schmitz
12th December 2006, 13:02
Without ever having seen a printer with this interesting feature, I would guess the reason is in the user authentication.

The lp spooler system does not really tell the printer, which user printed a specific print hob, so how would that work?

Does the feature work, if you send a manual print job with the lp command to the printer?
Do you use direct printing from baan or do you print via the printer daemon?

Regards

Markus

Danny Leolux
12th December 2006, 14:03
Hi Markus,

All our Baan device are setup as 'Direct'. Via SAM (unix) the printers are setup as remote printers 'pointing' to our file&printer server in our Citrix/Windows enviroment.

I just tried to send a document directly from Unix via the 'lp' command and to my supprice the document was 'buffered' and only came out when I was at the printer and activated it. So the 'printing on demand' functionality workes when directly printing from Unix but not when it is printed from Baan.

Somehow the printerdriver linked to the Baan device sents 'something' to the the printer that interfears with it.

Do you have any idea's ?

Grtz.
Danny

Markus Schmitz
12th December 2006, 15:04
Hi Danny,

So i fthe lp command works and you use direct printing, then it should in principle also work from Baan. I agree with you, that most likely the printer driver of Baan "does something".

The good thing about the printer driver in Baan is, that you can easily analyze "what it does" and change it. Most likely you know the following already, but to be on the safe side:

The printer driver in Baan resides in $BSE/lib/printinf/<X>, where X is the first letter of the driver name. It's an ascii file, which can be edited with vi. The interesting bits and pieces are initpr and resetpr, which are send at the beginning of the print job.


A long time ago I analyzed the contents of the hp_lj4 driver and here is my result:


initpr=\EE\E&l26a66F\E(12U\E(s10H\E&l5H\E(s0p10h0s0b4099T\E&k11.6H,
# | | | | | | | | | | | |--- horizontal motion
# | | | | | | | | | | |-------- Typefacce
# | | | | | | | | | |---------- medium stroke
# | | | | | | | | |------------ upright style
# | | | | | | | |--------------- 10 Chars per inch
# | | | | | | |-------------------- fixed Spacing
# | | | | | |--------------------------- Tray 3
# | | | | |---------------------------------- 10 Chas per inch
# | | | |--------------------------------------- IBM Layout EU
# | | |------------------------------------------- 66 Lines
# | |------------------------------------------------- Paper Size ?
# |----------------------------------------------------- Reset

resetpr=\E(s10H\E&l5H\E(s0p10h0s0b4099T\E&k11.6H,
# | | | | | | | |--------------------- horizontal motion
# | | | | | | |--------------------------- Typeface
# | | | | | |----------------------------- medium stroke
# | | | | |------------------------------- upright style
# | | | |---------------------------------- 10 chars per inch
# | | |--------------------------------------- fixed spacing
# | |--------------------------------------------- Tray 3
# |---------------------------------------------------- 10 chars per inch



My assumption is, that in initpr, the driver sends an escape sequence restting the printer and discarding any previous commands and maybe so screw up your "buffering".

Try (on your test system) to remove the resetting escape sequence and see what happen!

Good luck,

Markus

Danny Leolux
12th December 2006, 15:53
Hi Markus,

When I just remove the reset code, nothing changes. The output keeps comming out immediately.

However when I completely disabled the initpr en resetpr 'printing on demand' works. The printer 'buffered' the output and I could print it when I was at the printer.
Ofcourse the print was unreadable sinds the wright escape codes to translate the characters were not send to the printer.

Now the big question is which of the escape codes is the one that messes up the settings of the printer. Or is there an extra code that should be added?

Perhaps someone knows this?

In the meantime I'll keep experimenting with the often proven method of 'trial and error' ;) ;)
Danny