[cups] turning off fit-to-page

Gary Dale gary at extremeground.com
Thu Feb 1 06:49:56 PST 2024


On 2024-01-25 19:37, Douglas Kosovic wrote:
> On 26/1/24 1:30 am, Gary Dale wrote:
>> On 2024-01-22 10:51, Douglas Kosovic wrote:
>>> I suspect the old "-o fit-to-page=off" option has been superseded by
>>> the "-o print-scaling=none" standard IPP Everywhere option.
>>>
>>> Extract from https://github.com/OpenPrinting/cups-filters/issues/108 :
>>>
>>> "none: do not scale the document to fit the requested media size. If
>>> the document is larger than the requested media, center and clip the
>>> resulting output. If the document is smaller than the requested
>>> media, center the resulting output."
>>>
>>> There is more discussion about the "-o print-scaling=none" option
>>> here with JPEG images:
>>> https://github.com/OpenPrinting/cups-filters/issues/362
>>>
>> Thanks Doug. That seems to work. It looks like the option could take a
>> variety of useful parameters, but a look at the IPP everywhere
>> protocol seems to dash that hope. It would be nice if the developers
>> would document how lp currently works...
> The following Debian page has great documentation on image manipulation with cups-filters including the evolution of the -o crop-to-fit and -o print-scaling=none options for various versions of cups-filters:
> https://wiki.debian.org/CUPSImageManipulation
>
> An interesting piece of information from that page that I suspect is applicable to Gwenview (which I believe is a KDE application that uses QtPrintDialog that uses PPD attributes and hasn't been updated to query and use IPP attributes), is that the print-scaling options will appear in an application's print dialog if the PPD file was generated by the cups-filters driverless PPD generator (and not by the CUPS IPP Everywhere PPD generator, nor with older PPD files).
>
> The following print-scaling lines were taken from a PPD file generated by the cups-filters driverless PPD generator. You could try adding them to the end of a PPD file (e.g. /etc./cups/ppd/queue-name.ppd ) and then restarting cups for the change to take effect.
>
> *OpenUI *print-scaling/Print Scaling: PickOne
> *OrderDependency: 10 AnySetup *print-scaling
> *Defaultprint-scaling: auto
> *print-scaling auto/Automatic: ""
> *print-scaling auto-fit/Auto-fit: ""
> *print-scaling fill/Fill: ""
> *print-scaling fit/Fit: ""
> *print-scaling none/None: ""
> *CloseUI: *print-scaling
>
>
> I don't have a working KDE desktop environment at the moment to confirm if PPD modifications work with Gwenview.
>
>
>
> Cheers,
> Doug
> ________

I checked with Gwenview and also Okular and the print dialog is the same 
in both cases and does offer scaling. However my query was about lp.

Also, I'm not in the habit of looking for KDE documentation for things 
that aren't specifically KDE, And the search engine I use seems to agree 
with me. The man page should be updated. There is no mention of print 
scaling in the man page for lp in bookworm. Nor did the current method 
of accessing it appear in any of the pages I found through a search 
online. The information may be out there but it's not in the places one 
would expect to find it.

As for printing from KDE, that remains an issue. I have not been able to 
print from my workstation to a network printer in close to a year. I 
couldn't print from bookworm to bullseye and I can't print from trixie 
to bookworm. However I can print from bookworm to bookworm.

The failure of network printing is why I've had to use lp on my print 
server to print.




More information about the cups mailing list