On Wed 18 Mar 2026 at 16:50:24 (-0400), Haines Brown wrote:...
In a new installation, when printing with lpr the output is
landscape when it should be portrait.
When CUPS prints its test page, it is normal (portrait)
I tried:
$ lpoptions -p HP_LaserJet_Pro_M428f_M429f_8264A8 -o
orientation-requested=portrait
What effect does it have in the configuration file. Indeed, what are
the contents?
And do you have any systemwide configuration set?
If nothing else works, perhaps read:
https://wiki.debian.org/CUPSPdfToPdf
On Fri, Mar 20, 2026 at 03:46:30PM -0000, CGS wrote:
On 2026-03-20, Haines Brown <haines@histomat.net> wrote:
On Thu, Mar 19, 2026 at 01:43:40PM -0000, CGS wrote:
On 2026-03-18, Haines Brown <haines@histomat.net> wrote:
In a new installation, when printing with lpr the output is
landscape when it should be portrait.
When CUPS prints its test page, it is normal (portrait)
What about
printf "Hello\n" | lpr
The orientation might be informative.
The orientation is landscape
In a new installation, when printing with lpr the output is
landscape when it should be portrait.
When CUPS prints its test page, it is normal (portrait)
The -o option works
$ lpr -o orientation-requested=3 <file> prints portrait
$ lpr -o orientation-requested=4 <file> prints landscape
When I print a file opened with emacs by means of Ctl-p, the
result is landscape when it should be portrait.
The operating system is a fresh install and so drivers˙are up to
date.
I do:
$ lpoptions -p HP_LaserJet_Pro_M428f_M429f_8264A8 -o
orientation-requested=portrait
This has no effect on the operation of lpr
lpr myfile.pdf
prints portrait as expected
echo "Hi, there" | lpr
prints landscape. why?
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?
Is this driverless printing or is there a ppd file?
You said '-o
orientation-requested=3' is ignored? The thing is to verify whether or
not that orientation request is being passed on to CUPS or not in order
to narrow things down.
On Sat, Mar 21, 2026 at 02:50:17PM -0000, CGS wrote:
Is this driverless printing or is there a ppd file?
Driverless
You said '-o
orientation-requested=3' is ignored? The thing is to verify whether or
not that orientation request is being passed on to CUPS or not in order
to narrow things down.
How can that be verified? It is logged somewhere?
On 3/18/26 3:50 PM, Haines Brown wrote:
In a new installation, when printing with lpr the output is
landscape when it should be portrait.
When CUPS prints its test page, it is normal (portrait)
The -o option works
$ lpr -o orientation-requested=3 <file> prints portrait
$ lpr -o orientation-requested=4 <file> prints landscape
When I print a file opened with emacs by means of Ctl-p, the
result is landscape when it should be portrait.
The operating system is a fresh install and so drivers?are up to
date.
I do:
$ lpoptions -p HP_LaserJet_Pro_M428f_M429f_8264A8 -o
orientation-requested=portrait
This has no effect on the operation of lpr
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?
echo "Hi" | lpr -o orientation-requested=4
and
echo "Hi" | lpr -o orientation-requested=5
still print landscape
echo "HI" | lpr -o orientation-requested=3
prints portrait
echo "HI" | lpr -o orientation-requested=6
prints reverse portrait (rotated 180 degrees)
On 2026-03-22, Haines Brown <haines@histomat.net> wrote:
On Sat, Mar 21, 2026 at 02:50:17PM -0000, CGS wrote:
Is this driverless printing or is there a ppd file?
Driverless
You said '-o
orientation-requested=3' is ignored? The thing is to verify whether or
not that orientation request is being passed on to CUPS or not in order
to narrow things down.
How can that be verified? It is logged somewhere?
lpr -o orientation-requested=3 file.txt
lpstat -W all
# grab job ID, then:
sudo strings /var/spool/cups/cN | grep -i orient
I think that should work.
On 2026-03-22, CGS <etphonehomefrance@gmail.com> wrote:
On 2026-03-22, Haines Brown <haines@histomat.net> wrote:
On Sat, Mar 21, 2026 at 02:50:17PM -0000, CGS wrote:
Is this driverless printing or is there a ppd file?
Driverless
You said '-o
orientation-requested=3' is ignored? The thing is to verify whether or >>> not that orientation request is being passed on to CUPS or not in order >>> to narrow things down.
How can that be verified? It is logged somewhere?
lpr -o orientation-requested=3 file.txt
lpstat -W all
# grab job ID, then:
sudo strings /var/spool/cups/cN | grep -i orient
I think that should work.
Anyway, we now know that orientation-requested=3 works. So make it the permanent default.
The flag is documented in the RFC.
Anyway, we now know that orientation-requested=3 works. So make it the
permanent default.
The flag is documented in the RFC.
Where is the RFC?
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.
I think the 1024 sizes above merely reflect the pipe's buffer size:
the corresponding d file will be the true size.
CUPS is based on a PDF workflow, so the first step with text is to
convert it to a PDF. I think that's the filter which is producing
landscape pages, and I think that the second filter, pdftopdf, is autorotating such pages before it gets sent to the printer by the
final filter.
I'm assuming that when you print an ordinary portrait PDF, you get
a normal-looking portrait document.
Where is the RFC?
$ wget https://www.ietf.org/rfc/rfc8011.txt
at page 122.
Before you make a portrait option permanent, I would find out what
happens with documents that have mixed orientation from page to page. (There's a "mixed.pdf" document available on the wiki page referenced earlier.)
I'm assuming that when you print an ordinary portrait PDF, you get
a normal-looking portrait document.
No, when I print a pdf, the output is lansscape.
"Just fine" seems to contradict the statement made above:
No, when I print a pdf, the output is lansscape.
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 packages. 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.
I just installed the operating system on two other disks. No
problem printing with lpr on either of them. Purging and
reinstalling cups-bsd did not help. For my convenience, I now use
a2pr to print plaint text files, for it prints as it should
On 2026-03-26, Haines Brown <haines@histomat.net> wrote:
I just installed the operating system on two other disks. No
problem printing with lpr on either of them. Purging and
reinstalling cups-bsd did not help. For my convenience, I now use
a2pr to print plaint text files, for it prints as it should
What is a2pr? Can't seem to find it.
| Sysop: | Jacob Catayoc |
|---|---|
| Location: | Pasay City, Metro Manila, Philippines |
| Users: | 5 |
| Nodes: | 4 (0 / 4) |
| Uptime: | 493853:25:28 |
| Calls: | 146 |
| Files: | 547 |
| D/L today: |
6 files (97K bytes) |
| Messages: | 76,985 |