On Wed, Nov 12, 2008 at 12:51 PM, Massimo Del Fedele max@veneto.com wrote:
The best way would be, of course, replace ALL LPR code with direct cups calls. It's feasible, but it requires some refactoring of all printing code. For example, what's now exec("|lpr -P myPrinter") which I replaced with exec("|lpr -P myPrinter -o myPaperSize") should become CupsCreateJob(....) CupsStartDocument(....) CupsWriteRequestData(....) CupsFinishDocument(....)
That would require some amount of work and, over all, I'm not sure it could be accepted to go into wine code.
You should check if cups is present at compile time (which I guess we already do) and then dlopen the cups libraries if present (again I assume we already do this) and yes use the cups api if possible rather than directly invoking lpr.