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

Michael Karcher wine at mkarcher.dialup.fu-berlin.de
Wed Nov 12 11:39:24 CST 2008

Am Mittwoch, den 12.11.2008, 16:41 +0100 schrieb Massimo Del Fedele:
> >>> The patch solves it adding "-o PageSize=<pagesize>" to lpr command.
> >> Is there something wrong with this one ? 
> > Adding parameters to the lpr command this way is ugly and
> > dangerous. There has to be a better way to make cups use the correct
> > page size.
> Staying with LPR code, I could use
>         lpoptions -d <printer> -o media=<media>
> exec-ing it before starting document, but then the selected media would 
> stay there as default for next print jobs (I guess also outside wine's).
> Would it be better ?
No you should go into the opposite direction. CUPS should provide you
with an PPD file telling you what postscript fragment has to be included
into the job to select the right page size. Also the correct DSC comment
"%%PaperSize" might help.

  Michael Karcher

More information about the wine-devel mailing list