[cups] force CUPS print server to fit-to-page

Josh iptvhub75 at gmail.com
Fri Jul 3 20:43:39 PDT 2020


Till,

After your command I see an option is added to printers.conf. But no
changes in output print size. Still 4x6 image.

Not sure if helpful but
lpoptions -l
shows, among other things:

PageSize/Media Size: *Letter
StpiShrinkOutput/Shrink Page If Necessary to Fit Borders: Shrink Crop
*Expand

My understanding that the above is coming from the .ppd file only.

CUPS log file mentions requested page size w288h432 and *Expand to *Letter
is clearly ignored unless it means something else.

Josh.

On Fri, Jul 3, 2020 at 4:33 PM Till Kamppeter <till.kamppeter at gmail.com>
wrote:

> Try
>
> lpadmin -p PRINTER -o fit-to-page-default=true
>
> with PRINTER being the name of your print queue.
>
> Does this work?
>
>     Till
>
> On 03/07/2020 21:28, Josh wrote:
> >   Greetings,
> >
> > I've just set up an AirPrint server for a home office by following
> > instructions in
> >
> > https://www.linux-magazine.com/Issues/2013/154/AirPrint-in-Linux
> > and
> > https://github.com/jpawlowski/airprint-generate
> >
> > Printer works just fine except for a problem described in
> >
> >
> https://serverfault.com/questions/897140/force-cups-print-server-to-fit-to-page-if-job-is-not-a4
> >
> > Text jobs sent from iOS devices print full pages but photos and images
> > print size is 4x6 inches.
> >
> > CUPS v1.6.3 on CentOS 7.
> >
> > Does anyone have any ideas?
> >
> > Please advise,
> > Josh.
> >
> > PS. More tests and observations:
> >
> > $ sudo lpoptions -o auto-fit=True
> >
> > has zero effect as well as adding
> >
> > Option auto-fit True
> >
> > to the DefaultPrinter section of /etc/cups/printers.conf.
> >
> > As a matter of fact I have an impression that all options created by
> > lpoptions command and stored in /etc/cups/lpoptions have zero effect.
> >
> > For example
> >
> > $ sudo lpoptions -o media=Letter
> >
> > has no effect whatsoever but adding line
> >
> > Option media Letter
> >
> > to the DefaultPrinter section of /etc/cups/printers.conf has a very
> > noticeable effect despite the fact that Letter has already been selected
> in
> > printer settings UI.
> >
> > As a side question, could anyone explain the difference between
> lpoptions,
> > printers.conf and printers settings UI?
>
>


More information about the cups mailing list