[cups] turning off fit-to-page
Gary Dale
gary at extremeground.com
Thu Jan 4 06:32:05 PST 2024
I'm running Debian/Bookworm on an AMD64 server. I'm usually trying to
print to a HP CP1215 colour laser printer.
CUPS has been a nightmare for the past year, but I get around it a
little by printing from the command line. My workstation can't seem to
print to the server's printers anymore so I have been working around it
by creating a PDF or image file and using lp to print from the server.
However this doesn't work when I have a document that extends into the
printer margins. Then lp shrinks the document to fit the margins, which
is not what I want. I want the printer to crop at the margins so I get
as much of the document as the printer allows without any alterations
and without having to create a separate document for each printer I
might use.
This brought me to the barely documented option "fit-to-page" which
(apparently) is turned on by default so that iOS users can air print
their photos. I supposedly should be able to override this by setting
fit-to-page=off. I supposed to be able to do this using the lpoptions
command or specifying it on the lp command using "-o fit-to-page=off".
Neither worked.
If I use lpoptions as either my regular user or as root, it has no
impact - using loptions -p <queue name> -o fit-to-page=off or omitting
the -p <queue name> - all 4 variants fail. However I did note some odd
behaviour setting the lpoptions. When I list the options, fit-to-page
never shows. However if I look at the lpoptions file, the global one
only contains the default queue name while the local user one appends
"fit-to-page-off=true" to the default line.
If I put the -o fit-to-page=off in the lp command, the jpeg file ends up
printing over 4 pages, with about 1/4 of the image centred on each page
- possibly full size but not what I expected or wanted or can use.
I will also note that running "lpoptions -l" never shows the
"fit-to-page" setting but it does confirm that my default paper size is
"letter". Nor is there a "fit to page" setting through the CUPS printer
management page (<servername>:631). However, I used to print unscaled
documents to this printer (just not through Gwenview which doesn't have
a print full size & crop option, which was why I originally started
trying to use lp).
Is there a way I can get this to work?
More information about the cups
mailing list