Bug 164665 - Page layout changes to portrait when switching printers
Summary: Page layout changes to portrait when switching printers
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2025-01-11 06:38 UTC by Saburo
Modified: 2026-02-11 05:22 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (75.54 KB, image/png)
2026-02-10 09:19 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Saburo 2025-01-11 06:38:10 UTC
Description:
When printing a landscape document, if you switch printers in the print dialog, the auto-detect page layout orientation becomes portrait.

Steps to Reproduce:
1.In writer, set the page layout to landscape and enter any text you like.
2.File - Print from the menu bar or ctrl+P on your keyboard
3.Select a different printer from the Printer drop-down list. (You may also click on the default printer in the drop-down list)

Actual Results:
The preview in the print dialog is portrait.

Expected Results:
The print dialog preview remains in landscape orientation.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c9ae567c791bcffdc3fff9e3fb11b46275a13d2b
CPU threads: 12; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL threaded
Comment 1 m_a_riosv 2025-01-11 23:10:54 UTC
Reproducible

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c9ae567c791bcffdc3fff9e3fb11b46275a13d2b
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-US (es_ES); UI: en-US
Calc: CL threaded
Comment 2 m_a_riosv 2025-01-11 23:17:27 UTC
Latest version that works on the ones I have installed.
Version: 25.2.0.1 (X86_64) / LibreOffice Community
Build ID: ddb2a7ea3a8857aae619555f1a8743e430e146c9
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 3 BogdanB 2025-01-12 05:48:56 UTC

*** This bug has been marked as a duplicate of bug 162488 ***
Comment 4 Buovjaga 2025-01-13 05:28:13 UTC
Incorrectly closed as duplicate, quoting Saburo from bug 162488 comment 12:

In my report TDF164665, this occurs in A4 landscape.
The bisecting result is the following branch point:
https://git.libreoffice.org/core/+/61f8fb648ecf9a20ee8abec0e8d3fad3e666db5e%5E%21

Subject is:
Related: tdf#159995 allow setting the page size when printing to file
Comment 5 Justin L 2025-10-24 00:09:12 UTC
Sounds to me like a duplicate of bug 162748.
Comment 6 Duffey O. 2025-11-17 10:38:07 UTC
Is where a solution to correct this regression ?
Comment 8 Mike Kaganski 2026-02-10 05:21:14 UTC
Works fine using Version: 26.2.1.1 (X86_64)
Build ID: 620(Build:1)
CPU threads: 24; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: en-GB (en_US); UI: en-GB
Calc: CL threaded
Comment 9 Buovjaga 2026-02-10 06:58:21 UTC
Saburo: any update on this?
Comment 10 BogdanB 2026-02-10 07:25:00 UTC
I have problems but only on Calc, not on Writer, like in this bug description.
Comment 11 Saburo 2026-02-10 08:15:22 UTC
works fine.
Version: 26.2.0.3 (X86_64)
Build ID: 620(Build:3)
CPU threads: 8; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded

I think this bug can be closed.
Comment 12 Mike Kaganski 2026-02-10 08:29:54 UTC
(In reply to Saburo from comment #11)
> I think this bug can be closed.

Then close it.
Comment 13 BogdanB 2026-02-10 09:06:50 UTC
I reproduce using Microsoft XPS Document Writer printer.
Version: 26.2.0.3 (X86_64)
Build ID: 620(Build:3)
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: ro-RO (en_US); UI: en-US
Calc: threaded

Saburo, can you test on Windows? Or Mike? All the others printers are ok.
Comment 14 Mike Kaganski 2026-02-10 09:13:09 UTC
(In reply to BogdanB from comment #13)
> I reproduce using Microsoft XPS Document Writer printer.

With Writer? Anything else if for a separate bug.
Comment 15 BogdanB 2026-02-10 09:17:29 UTC
Yes, with Writer. 

On Calc the problem is much worse. But different bug.
Comment 16 BogdanB 2026-02-10 09:19:22 UTC
Created attachment 205447 [details]
screenshot
Comment 17 Mike Kaganski 2026-02-10 10:01:40 UTC
There's no XPS writer on Windows 11 - can't test. It works with all printers set up here.
Comment 18 Mike Kaganski 2026-02-10 10:09:42 UTC
Aha - it was an optional feature. Installed, tested; confirmed. But it's different; the "Paper size" drop-down is empty there. Please file separately.
Comment 19 BogdanB 2026-02-10 10:41:01 UTC
Mike, also the size of the paper is missing, but you can see the orientation of the page: in the background landscape, in preview portrait. Borders are not visibile, but you can see the sizes of the paper.
Comment 20 Mike Kaganski 2026-02-10 13:03:39 UTC
(In reply to BogdanB from comment #19)

I know that. And I even know what code is responsible. And I also know that changing *that* code would affect different areas of codebase, with different regression potential. So - if you want it fixed, do file it separately, to track it separately.
Comment 21 Saburo 2026-02-10 23:53:48 UTC
(In reply to Mike Kaganski from comment #20)
> (In reply to BogdanB from comment #19)
> 
> I know that. And I even know what code is responsible. And I also know that
> changing *that* code would affect different areas of codebase, with
> different regression potential. So - if you want it fixed, do file it
> separately, to track it separately.

Mike,
 For example, bug 165054.
Paper size is Japanese envelope "長形3号".
Does this mean you know why the paper size changes just by checking the printer properties dialog?
Comment 22 Mike Kaganski 2026-02-11 05:22:27 UTC
(In reply to Saburo from comment #21)

Sigh. We were discussing one very specific problem:

(In reply to BogdanB from comment #13)
> I reproduce using Microsoft XPS Document Writer printer.

I installed Microsoft XPS Document Writer printer, saw how it was special, made a minimal debugging, and discovered where the problem was. If there will appear a bug report, I will even fix it.

It is not reasonable to look at random other reports, that look similar.