Download it now!
Bug 129180 - UI Print dialog shows incorrect paper size by default
Summary: UI Print dialog shows incorrect paper size by default
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:7.2.0
Keywords: bibisected, regression
: 132774 139265 (view as bug list)
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
Reported: 2019-12-04 13:49 UTC by NISZ LibreOffice Team
Modified: 2021-01-26 10:56 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:

Example file from Writer (20.18 KB, application/binary)
2019-12-04 13:53 UTC, NISZ LibreOffice Team
Screenshot of the problem in Writer (104.22 KB, image/png)
2019-12-04 13:54 UTC, NISZ LibreOffice Team

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-12-04 13:49:03 UTC
Attached example document has C5 page size and some text. When this is printed, the Print dialog shows the page size as A4 in the paper size list, while the preview shows the correct size.

Steps to Reproduce:
1.	Open attached document and try to print it

Actual Results:
The print dialog shows the preview as 162mm by 229mm (correct C5 size) but under Page Layout the Paper size dropdown shows A4.

Expected Results:
The Paper size dropdown should show C5 size.

Reproducible: Always

User Profile Reset: No

Additional Info:
LibreOffice details:
Version: (x64)
Build ID: 0faf74a58847a4b87ae43092fe1ca2011bbd1f90
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

Also in:
Verzió: (x86)
Build az.: 057fc023c990d676a43019934386b85b21a9ee99
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: GL; VCL: win; 
Területi beállítások: hu-HU (hu_HU); Felület nyelve: hu-HU
Calc: CL

Before 6.3 there was no Paper size dropdown in the old dialog.
Comment 1 NISZ LibreOffice Team 2019-12-04 13:53:48 UTC
Created attachment 156296 [details]
Example file from Writer
Comment 2 NISZ LibreOffice Team 2019-12-04 13:54:55 UTC
Created attachment 156297 [details]
Screenshot of the problem in Writer
Comment 3 Durgapriyanka 2019-12-04 16:20:27 UTC
Thank you for reporting the bug. I can confirm the bug present in

Version: (x86)
Build ID: ec7374ff84c71edfbb30d6e4dc5b486b6df7107f
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-11-10_21:37:30
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 4 BogdanB 2019-12-07 16:56:55 UTC
Confirm it on:
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded

And also on:
Build ID: 5030be4e85179147476b1e441eb618fb6ed58235
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-11-28_20:14:48
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded

Also on
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded

On 6.2 is OK, but this 6.2 was the old look for printing something.
Not very usefull...
Build ID: 23edc44b61b830b7d749943e020e96f5a7df63bf
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 NISZ LibreOffice Team 2020-05-07 07:18:38 UTC
*** Bug 132774 has been marked as a duplicate of this bug. ***
Comment 6 Telesto 2020-07-08 08:38:01 UTC
Adding bibisect request.. maybe it points to something
Comment 7 BogdanB 2020-07-08 08:57:30 UTC
Telesto, I think Print Window was reworked in 6.3, so this problem is from it's start in 6.3.
Comment 8 NISZ LibreOffice Team 2020-07-08 13:14:15 UTC
*** Bug 134646 has been marked as a duplicate of this bug. ***
Comment 9 pavlog 2021-01-07 20:49:17 UTC
Bisected it in win32-6.3. 
First bad commit is c2ee336288dcee103f297a55287fbca596a6c7a1
committer	Tomaž Vajngerl 

c35e4519af538ca104ccf21fdc04060cf7b4289a is the first bad commit
commit c35e4519af538ca104ccf21fdc04060cf7b4289a
Author: Norbert Thiebaud <>
Date:   Wed Dec 5 08:49:16 2018 -0800

    source sha:c2ee336288dcee103f297a55287fbca596a6c7a1

Adding Cc: to <Tomaž Vajngerl>
Comment 10 Justin L 2021-01-19 14:03:33 UTC
Using bibisect-linux-64-6.3, I confirm that at the initial implementation of the new print dialog, both the preview pane's paper size, and the drop-down size were A4.  (However, if you look at the printer properties, it shows C5 paper, and then if you CANCEL, then the dialog updates both places update to C5.)
That bibisects to Daniel Silva's New Print Dialog Design commits:

78b5211f3464d7374b2888f2078da387f5a01ae6 is the first bad commit
    source sha:bc0146c2ae43256552c276d2dd86291c98556c42
    source sha:bc0146c2ae43256552c276d2dd86291c98556c42
    source sha:6686eaa079f5557d0f3bbe92781ad9854d8a5ef6
    source sha:86c60a6af62bf50d5a6e7bc59bb29bfc1983584a
    source sha:8cbdc6a068ad88fc43a98bd0f88fcb7c4ad3ebd9
    source sha:faf2b0f165e9d9e3160e5d54e3d2e9973facf0b8
    source sha:07e4261ceaea31a20ab2bc1a76df722ed0bd54c4
    source sha:cff219f792085645a13b4a703882a8984ce78ddc
    source sha:b368e4043582e6785a88b444e148fdffdc2aece1
    source sha:b4601ff6d9261d185cd440ebdbca8d78f3b5d459
    source sha:a0f02b8856fce1ee0eb5f1748c7c7fc04bd568a6
    source sha:952e4a6ffd95b49d421b6477b3f8e33a6550097f
    source sha:e1bb5b2cd8ecc4db760b1d413e28edc388da5c3e
    source sha:ef9e16fd1720249620c628da66ec856a5629ff2a
    source sha:ff4896a2af1df6138e9246fe1588dfe8c3748f1a
    source sha:1a2ebd24e5daaefa209dea7f4b1889a8295b5794
    source sha:bc34eaa0a87ff89b07581551991ac83d69f64d63
    source sha:226ede405ed4549b7652c9a8421af37511e0046a
    source sha:76e22667625ce8d16dfaa8617a199b774e987a70
    source sha:5c7fb4b4cd9409f8b92a4bb3fe288ba83ced2502
    source sha:cb443d07d54d6698eff51b5be2c6b56323f10315

The print preview paper size was fixed to show C5 in 6.4
author	Gabor Kelemen on 2019-12-12 17:47:50 +0100
commit	8659c42c4a016722cf6418e6ff1cd34bc5bdf88e
tdf#123076 Get paper size for print preview
Initialize from current paper size which can be different from A4
Comment 11 Justin L 2021-01-19 17:09:06 UTC
This can be "solved" a few ways.
One would be to add to PrintDialog::PrintDialog
+ getJobPageSize();

Or perhaps better would be to tag along with Gabor's patch and setPaperSizes each time it changes (like changing from brochure to pages per sheet).

However, that still won't address that other common sizes (like A5) don't show up, so there can still be a mismatch between the preview and the combobox size. I wonder if "Automatic" can be added to the paper size as well (although that will complicate that option).
Comment 12 NISZ LibreOffice Team 2021-01-19 17:59:35 UTC
*** Bug 139265 has been marked as a duplicate of this bug. ***
Comment 13 Commit Notification 2021-01-26 10:56:27 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

tdf#129180 Fix default paper size in the dropdown

It will be available in 7.2.0.

The patch should be included in the daily builds available at in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.