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

Steven Edwards winehacker at gmail.com
Wed Nov 12 12:14:50 CST 2008

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.

Steven Edwards

"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo

More information about the wine-devel mailing list