Bug 122079 - New printer dialog in 6.3+ doesn't detect Automatic Orientation well so page orientation can be changed
Summary: New printer dialog in 6.3+ doesn't detect Automatic Orientation well so page ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: x86-64 (AMD64) All
: high major
Assignee: Daniel Silva
URL:
Whiteboard: target:6.3.0
Keywords: bibisected, regression
: 122636 (view as bug list)
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2018-12-13 16:05 UTC by Regina Henschel
Modified: 2019-03-13 12:31 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Document to test printing of DIN A5 onto DIN A4 (16.37 KB, application/vnd.oasis.opendocument.text)
2018-12-13 16:05 UTC, Regina Henschel
Details
Printer Properties in Windows (49.60 KB, image/jpeg)
2018-12-28 17:42 UTC, Timur
Details
Envelope followed by letter (12.31 KB, application/vnd.oasis.opendocument.text)
2019-01-21 17:22 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2018-12-13 16:05:23 UTC
Created attachment 147506 [details]
Document to test printing of DIN A5 onto DIN A4

Open attached document. It is in DIN A5 portrait. Try to print it brochure or in page custom layout "1 2" onto a DIN A4 landscape paper. You need not actually print, but going through the pages in the preview in the printing dialog already produces the error. The preview shows correctly A4 landscape as paper size, but then it sets "landscape" to the document pages.

Tested with EPSON WP-4025 on Windows 10 64-bit.

It is OK with old dialog in Version: 6.3.0.0.alpha0+ (x64)
Build ID: 70970f8b72eddc66693ec28d26c2dc764009d3e3
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-24_03:32:27
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

It is broken with new dialog in Version: 6.3.0.0.alpha0+ (x64)
Build ID: beae6c7a7f163daad0d4dea63a3d403af2745fd1
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-12-07_01:25:50
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded

Besides that, the option "Use only paper size from printer preferences" is missing, by which you can force a paper size independent of the page size of the document.
Comment 1 Timur 2018-12-14 17:35:22 UTC
Looks so.
Comment 2 Xisco Faulí 2018-12-18 16:26:01 UTC
This is master only, no need to set it to critical...
Comment 3 Timur 2018-12-28 10:50:19 UTC
We may have concluded wrong. 
New dialog has "Orientation" in Page Layout of General tab. Looks like new setting.
Orientation is for me Automatic and than changes to Landscape. If I change to Portrait, if OK. 
So this is just an enhancement to detect Orientation better.
I'll set so. If I'm wrong, please revert.

As for missing options, I also don't see "Use only paper size from printer preferences" in "More options". That would be regression.
Xisco, please bibisect that one. There may be an explanation.
Comment 4 Regina Henschel 2018-12-28 14:19:21 UTC
Timur, the problem is, that the printing dialog changes the page orientation of the document. That should never happen.

Load document, notice it has portrait page orientation,
Open printing dialog, click on "next" of printing preview, cancel printing dialog. Notice, that the page orientation of the document has changed from portrait to landscape.
Comment 5 Michael Weghorn 2018-12-28 16:56:08 UTC
(In reply to Regina Henschel from comment #4)
> Timur, the problem is, that the printing dialog changes the page orientation
> of the document. That should never happen.

I totally agree. However, I remember that this was intended as a feature, s.a. https://gist.github.com/danielfaleiro/992aa39557f8475b8f4daa3af4bb3052 : "In Writer, printer page orientation is now synchronized with document orientation. That means that if you select page orientation in print dialog, the document will adapt to the new orientation. There is no need to close the print dialog, go to Format->Page, set the orientation you want to print and then reopen print dialog."

I think it might make sense to discuss again whether that's actually a good idea...
(Adding Mike in CC, since he also mentioned he considered this as a bug rather than a feature at the above github page. @Mike: Please apologize and unsubscribe again if you're not interested.)

@Daniel: What do you think? Would it be OK in your opinion to no longer modify the document based on settings made in the print dialog?

The same happens on Linux, by the way.


As far as the "Use only paper size from printer" preference is concerned: For Linux, this option is still available when you click in the device-specific options you see when you click on the "Properties" button. (So I'd say that's totally fine for the Linux case). I don't know about Windows, though. Is that option there as well?
Comment 6 Timur 2018-12-28 17:42:11 UTC
Created attachment 147878 [details]
Printer Properties in Windows

(In reply to Regina Henschel from comment #4)
> Timur, the problem is, that the printing dialog changes the page orientation
That's what bug is about, to have correct initial Automatic Orientation. 

(In reply to Michael Weghorn from comment #5)
> As far as the "Use only paper size from printer" preference is concerned:
> For Linux, this option is still available when you click in the
> device-specific options you see when you click on the "Properties" button.
> (So I'd say that's totally fine for the Linux case). I don't know about
> Windows, though. Is that option there as well?
I see that in Linux in Paper tab of Printer Properties. But in Windows, dialog depends on printer. Here is mine with "Paper Size" in Printer Properties.
Not sure if that option can be removed to rely on printer dialog.
Comment 7 Regina Henschel 2018-12-28 18:55:23 UTC
The change of the page orientation in the document happens even if the document is opened read-only.
Comment 8 Daniel Silva 2019-01-08 18:27:46 UTC
I think we all agree there is the following bug: changing orientation in print dialog breaks N-up/brochure paper orientation.

If the print dialog just changes paper orientation and the document orientation remains the same, the result is not practical to the user. The document would not fit the new paper orientation. Sometimes, part of the document would not even be printed because of this orientation mismtach. Another approach could be by fitting the document to new paper orientation, but that would leave a lot of blank spaces and the document would have to be shrinked/expanded to make it fit. It would not look good.

Besides, the new behavior is the same behavior of MS Office's Word. Word's print dialog does change document orientation. It makes sense to me: if I wish to print the document in another orientation, I would like it to make the best fit in the paper and that requires the document to adapt.

Maybe some users would understand the orientation mismatch. They would close the print dialog, then go to page->format and change document orientation. Then, they would finally be able to print in the orientation they wanted. However, that seems a lot of work to print a document in a different orientation. And besides, if changing orientation in print dialog would not bring the desired result unless you change document orientation elsewhere, why bother having a orientation option in the print dialog? It does not make sense.

Nowadays, the option to change orientation is very common in print dialogs. I think having such option in LO's print dialog is good to avoid the typical user complaint that LO's UI looks old.
Comment 9 Daniel Silva 2019-01-08 18:44:37 UTC
I don't remember why we removed the "Use only paper size from printer preferences" option. It seems it was a mistake.
Comment 10 Mike Kaganski 2019-01-08 18:58:59 UTC
(In reply to Daniel Silva from comment #8)

Ohh... I'm really sorry to disagree with this wishful thinking, but -

1. It is *not* expected that printing modifies document. That some editor decided to do that does not that it's (a) a good move at all, and (b) a viable solution for LibreOffice, taking into account that Word does not have a concept of page styles at all.
2. Have you tried to see how does this work with a simple case of a document with some pages having landscape pages, and some portrait? I assure you, it's an interesting experience.

As the maximum, I'd agree that a dedicated mode could be useful, like "Fit text to paper", which would do all those tricks *without modifying the document*! So a user who doesn't care about formatting, but wants a quick print-out of the data with maximally used paper space, would just select it, get what you offer now *only in the dialog and print*, and return to the intact document without modified orientation and "modified" status.

I believe that putting magic into print dialog is just plain wrong UX. Even if it would please some users, I don't believe it is an improvement for the majority.
Comment 11 Daniel Silva 2019-01-08 19:19:54 UTC
> (In reply to Mike Kaganski from comment #10)

Maybe you are right. I did not mention MS Office to say they are correct, but to show it is not that awkward. The way the orientation is changed now in print dialog could mess documents with a mix of diferent orientations on each page indeed, since it calls a function to change all pages' orientation.

I still don't like the idea of shrinking or expanding the document in Writer. Maybe it would not even be readable and images could get messy. However, clipping parts of the document because pages don't fit in the new orientation is also bad.
Comment 12 Timur 2019-01-10 15:12:00 UTC
*** Bug 122636 has been marked as a duplicate of this bug. ***
Comment 13 Regina Henschel 2019-01-21 17:22:25 UTC
Created attachment 148490 [details]
Envelope followed by letter

With patch from Gerrit applied:

The attached file prints fine with "printer try from printer" and in the printer settings "automatic" in L= 5.4.7. Printer: Epson WP-4025 on Windows 10.

Using the print dialog preview for and back shows either both envelope and letter in landscape envelope size or both in DIN A4 portrait letter size, but not individual.
Comment 15 Michael Weghorn 2019-01-29 15:58:20 UTC
(In reply to Regina Henschel from comment #13)
> Created attachment 148490 [details]
> Envelope followed by letter
> 
> With patch from Gerrit applied:
> 
> The attached file prints fine with "printer try from printer" and in the
> printer settings "automatic" in L= 5.4.7. Printer: Epson WP-4025 on Windows
> 10.
> 
> Using the print dialog preview for and back shows either both envelope and
> letter in landscape envelope size or both in DIN A4 portrait letter size,
> but not individual.

Hi Regina,
Daniel commented on the Gerrit patch ( https://gerrit.libreoffice.org/#/c/66483/ ) and suggests to create a separate bug report for the remaining print preview issue, which sounds fair to me. What do you think?
Comment 16 Commit Notification 2019-01-29 19:26:24 UTC
Daniel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/eaec995a96b41963ae9e5156b6c5c7ac022f9a55%5E%21

tdf#122079 - Document orientation is no longer changed in print dialog

It will be available in 6.3.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.
Comment 17 Xisco Faulí 2019-03-13 12:31:24 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 8aa579830b20072af8d6e149d6b279362fe98b91
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Daniel Silva, thanks for fixing this issue!!

BTW, there is nothing about the new print dialog in the release notes ( https://wiki.documentfoundation.org/ReleaseNotes/6.3 ). Could you please add a few lines there ?