Description: Print Preview: page orientation depends on moving forward or backwards through print preview Steps to Reproduce: 1. Open attachment 181979 [details] 2. Press Print button -> Dialog appears 3. Press the arrow right button of the print preview until you reach page 4: portrait orientation 4. press the arrow right button 5. press the arrow left button (back to page 4) -> landscape orientation Actual Results: Portrait orientation Expected Results: Consistent result: I assume it should be landscape. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: dc92a4d973086ce8a6a5f75ba0f4d4c9ca05537a CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL threaded
Also in Version: 6.2.9.0.0+ (x86) Build ID: 5f01fe15eb2661f1f9ce12d1d99dc2a705b462ee CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; Locale: nl-NL (nl_NL); UI-Language: en-US Calc: CL Fine - meaning consistent result - portrait orientation, with 6.1
On pc Debian x86-64 with master sources updated today, I got the exact opposite pb. At step 3 when I reach page 4, I got landscape orientation. But if I click right arrow button the left arrow button, it becomes portrait orientation. Anyway, let's put this one as New since there's indeed a pb here.
I gave a try with this: https://gerrit.libreoffice.org/c/core/+/140358 but I must recognize I'm not sure it's the right thing to do, printing part is quite tricky.
I cannot confirm the behavior. The print preview and the preview in the print dialog both show the correct size and orientation. I have tested it with Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 349e3af0c5dd5ed495ed61aab526f63c16f0e215 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: de-DE (en_US); UI: en-US Calc: CL threaded
I may be wrong but I think it depends on the printer driver LO uses. In my case the page size of the fourth page is unknown so it uses the same orientation as the previous page. Page 3 is A4 landscape, so when we go to next page, it stays landscape (which is the correct orientation). But if we go page 5, LO recognize A4 too but in portrait so, when going back to page 4, it stays portrait. Now I must recognize I don’t understand why Telesto has the opposite result for page 4.
Looks like we have something of an inconsistency in our paper sizes in the fallback vcl/unx/generic/printer/configuration/ppds/SGENPRT.PS *PageSize EnvC5/C5 Envelope: "<</PageSize [459 649] /ImagingBBox null>> setpagedevice" *PageSize EnvC6/C6 Envelope: "<</PageSize [323 459] /ImagingBBox null>> setpagedevice" ... *PageSize EnvC65/C65 Envelope: "<</PageSize [324 648] /ImagingBBox null>> setpagedevice" Where EnvC65 has a 1 point difference from EnvC6 width and a 1 point different from EnvC5 height. So this EnvC65 ends up as {m_eType = PAPER_USER, m_nPaperWidth = 11430, m_nPaperHeight = 22860} (e.g. 324 points / 72 points in an inch => 4.5in -> 11430 10ths of mm. While aDinTab in i18nutil/source/utility/paper.cxx has... {m_nWidth = 11400, m_nHeight = 22900, m_pPSName = 0x7ffff70325eb "EnvC65" so is 30 units width and 40 units height different from the accurate value, while our sloppy fit allows a 21unit diff. In my case the SGENPRT.PS fallback is getting used, different people with different printers may see different results.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/971804673efa7f461be21589d9e9bf0f982b8b54 Related: tdf#151107 EnvC65 page size is inconsistent with EnvC5 and EnvC6 It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/64e4363527422c913151efab0c0d0c6b8c2256c8 Related: tdf#151107 make "sloppy" paper fit up to 1.25pt It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Unassign myself since Caolán pushed the right fix.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7d95a22245e3a031016e403aafddc00a73008b74 Revert "Related: tdf#151107 make "sloppy" paper fit up to 1.25pt" It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Reminder to future me: Different case, which needs to checked; 1. Open Impress (empty sheet or template) 2. CTRL+P -> Preview Landscape (OK) 3. Change the suggested Paper Size from A4 to B5 (or something else) in the Print Dialog 4. Change the Paper Size back to A4 -> Print Preview in Portrait -> Should be Landscape, IMHO
The problem seems to arise when no suitable paper was found for the printer and the "orientation" is left at whatever was the orientation of the last paper that was seen. What I've done so far is to get the paper to match against "C65" so this specific case probably doesn't happen, but I have a follow up I want to try for the now hidden problem
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6005aeca4416eb0d583fd12ab837afa91d9d18ec tdf#151107 swap job orientation if paper matching swapped width/height It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
let give that a go then
I confirm it works now (f24841da29adb8c0b4a8ec1b29367ee63998d440) Thank you Caolán for the patches! Telesto: instead of putting VERIFIED right now, I prefer letting you give a try with a daily build including Caolán's patches since you had a behavior opposite to the one I had.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/40a428fde0a33e7127dfa30845d65c698e408053 Related: tdf#151107 make "sloppy" paper fit up to 1.25pt It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Julien Nabet from comment #15) > Telesto: instead of putting VERIFIED right now, I prefer letting you give a > try with a daily build including Caolán's patches since you had a behavior > opposite to the one I had. Working like a charm: Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: d3050ff4a1355f7ebd3d4e7ddc8fb64f2b8894dd CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL threaded