tags:

views:

50

answers:

2

moin-moin,

I know, I am the only living person, still writing software for OS/2, but maybe someone can give me a hint:

For a customer I need to print a lot of different Reports on many pre-printed papers, some one-side, some double-sided, orientation landscaped or portrait (so, there are many different combinations)

the option i use now is to assign every possible report to its own printer-driver and let the user set the apropriate settings once for those drivers.

what i need is a more generic way. I want the user just to provide the driver, and I myself want to set Orientation and Sideness (and even the paper feed) programatically.

Any suggestions if this is possible? And how?

Thanks, Peter

A: 

okay, just to close this and give a solution for anyone beaten with the same problem.

i installed pmpdfwriter, installed a postscript printer driver associated with this output device and replaced the gsos2.exe (which is called by the printersystem) with a small selfwritten program, that analyses the filename. If there are my special "parameters" in the name, i copy the generated PostScript file (from the printer driver) to a network device, alongside with a small shell script "lpr -P printer -other options for duplex and orientation and paper feed" which i get from a database and a small selfwritten "printer configuration application", else i call the original gsos2.exe. On the network side there is a unix server, that looks for the scripts and calls those scripts ("on UNIX all is text, on OS/2 most is binary"). With this technique, i have the option to print stacks of different reports on different papers (if they are fed in the same printer) together without mixing them with other print requests.

Peter Miehle
A: 

Though it's been 17 years since I was an OS/2 developer, I recall that around 1.3 - 2.0 the printing API operated in a similar manner to Win3.1/WinNT 3.51.

Your question has kindled a quest for me to hunt through SO for unanswered OS/2 questions, brb !

madman1969