[RESEND] Send page size to cups with lpr command on printing (bug 15942)

Massimo Del Fedele max at veneto.com
Wed Nov 12 12:18:50 CST 2008

Steven Edwards ha scritto:
> On Wed, Nov 12, 2008 at 12:51 PM, Massimo Del Fedele <max at 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.

So, replace ALL existing execs to lpr with direct cups calls ? Mixing 
them for a single print job is not possible, AFAIK.


More information about the wine-devel mailing list