On 3/22/26 5:08 AM, didier gaumet wrote:

Le 22/03/2026 à 01:16, nwe a écrit :

This is interesting. I performed some quick testing:

My printer is an HP_LaserJet_MFP_M426fdn. My Debian Trixie system is printing via CUPS, my print driver according to http://localhost:631/ printers/HP_LaserJet_MFP_M426fdn_E35487 is "driverless"

lpr myfile.pdf
prints portrait as expected

echo "Hi, there" | lpr
prints landscape. why?
[...]

One of the possible reasons is the use of the wrong printing subsystem: the lpr command is not CUPS native command for printing (that's the role of the lp command) but is provided by the cups-bsd package as a compatibility layer with the old Unix lpr printing susbsystem.

if the lpr or lprng package is installed on a system instead of the cups-bsd package, the setup used for a printer is the one from the lpr or lprng printing subsystem, not the one from CUPS printing subsystem.

If the lp command prints in portrait mode, that means either lpr or lprng package is installed and must be purged, and cups-bsd package is to be installed.

And, yes, CUPS and lpr or lprng are not conflicting pacages. cups-bsd and lpr or lprng are conflicting packages.

Ah, I did not mention, I ran into all that while doing my testing.

First I tested lp and got identical behavior as with lpr later. Next I noticed OP says lpr. I didn't have lpr so I apt install lpr.

That did not print at all for me. With some diagnostics I learned I need cups-bsd instead of lpr package. So I
# apt purge lpr
# apt install cups-bsd
After which I performed the tests I reported above.

I did not yet investigate, but at this point I suspect I have some kind of auto-rotation going on if I do not specify which orientation to print.

Reply via email to