Download it now!
Bug 118263 - Option “Load Printer Settings with the Document” does not Work Correctly.
Summary: Option “Load Printer Settings with the Document” does not Work Correctly.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Michael Weghorn
URL:
Whiteboard: target:6.5.0 target:6.4.0.1
Keywords:
Depends on:
Blocks: Printer-Settings Document-Options
  Show dependency treegraph
 
Reported: 2018-06-20 08:59 UTC by Harald Koester
Modified: 2019-11-22 13:52 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Koester 2018-06-20 08:59:53 UTC
In order to reproduce the bug:

[1] Disable option: Tools > Options … > Load/Save > Load > Uncheck “Load printer settings with the document”. Then OK.
[2] Open new Writer document and insert some text.
[3] Change printer settings: File > Printer Settings … > Options... > Check or uncheck a contents option. Then 2 times OK.
[4] Save and close document.
[5] Open document again.
[6] Display printer settings: File > Printer Settings… Options. The change of step 2 is still valid. This means at step 5 the printer settings have been loaded. Expected: No load at step 5.

Bug already exists in version 3.3.0. Hence inherited from OOo.
Comment 1 Buovjaga 2018-06-25 18:00:03 UTC Comment hidden (obsolete)
Comment 2 Buovjaga 2018-06-25 18:01:09 UTC Comment hidden (obsolete)
Comment 3 Harald Koester 2018-06-26 09:53:31 UTC
(In reply to Buovjaga from comment #1)
> I interpreted step 3 as:
> Check the option again, OK.
> Go back to the settings, uncheck it, OK.

Here is what I did at step 3 in more detail:
(a) Display dialogue Printer Options: File > Printer Settings... > Options ...
(b) In this dialogue I changed an option, e.g. I disabled the printing of the "Page background".
(c) OK in order to close the dialogue "Printer Options".
(d) OK in order to close the dialogue "Printer Setup".


> At step 6 I was still seeing it unchecked, so no problem for me.

And here some more explanations:
At step 4 all printer settings including the changed option of step 3 are saved with the document. 
At step 5 the document should be loaded without the printer settings due to the option "Load printer settings with the document", which was disabled at step 1.
At step 6 this is verified. That means that the change of step 3 should not occur any longer. But it did. In the mentioned example, the printing of the page background is disabled.
Comment 4 Buovjaga 2018-06-26 10:57:20 UTC
Sorry, I misread the steps and was in Tools - Options the whole time.

I confirm the problem.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: eff395c2d2a3026d9d65121e273af336fb0cfb19
CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on June 26th 2018
Comment 5 QA Administrators 2019-06-27 02:54:04 UTC Comment hidden (obsolete)
Comment 6 Harald Koester 2019-06-28 09:40:34 UTC
Bug still exists in version 6.2.4 (64 bit) with Win10.
Comment 7 Michael Weghorn 2019-11-15 11:52:05 UTC
I've taken a look at this. There are two options related to whether user/printer options should be loaded:

A) "Load user-specific settings with the document"
B) "Load printer settings with the document" (the one you mention)

Whether the options in "File" -> "Printer Settings" -> "Options" are loaded from the document is actually determined by A), s. method "SwXMLImport::SetConfigurationSettings" [1]. Those are document-settings in the end, independent of the actual printer set.

It seems that B) is only responsible for the actually printer-dependent settings that can be set in "File" -> "Printer Settings" -> "Properties".

Can you confirm it works if you disable option A) instead of B) ?


(While looking at this, I noticed another issue: If both, A) and B) are disabled, the "File" -> "Printer Settings" -> "Options" dialog is not properly initialized, all checkboxes are unchecked instead of showing the default values. It's shown correctly after opening the print dialog and then opening the dialog again.))


[1] https://gerrit.libreoffice.org/plugins/gitiles/core/+/71f9961488232697bcdb37db349569a20f15bb2d/sw/source/filter/xml/xmlimp.cxx#1320
Comment 8 Michael Weghorn 2019-11-21 08:18:13 UTC
(In reply to Michael Weghorn from comment #7)
> I've taken a look at this. There are two options related to whether
> user/printer options should be loaded:
> 
> A) "Load user-specific settings with the document"
> B) "Load printer settings with the document" (the one you mention)
> 
> [...]
>
> (While looking at this, I noticed another issue: If both, A) and B) are
> disabled, the "File" -> "Printer Settings" -> "Options" dialog is not
> properly initialized, all checkboxes are unchecked instead of showing the
> default values. It's shown correctly after opening the print dialog and then
> opening the dialog again.))

I'm currently looking into this issue.
While doing so, I also realized that the "Hidden text" and "Text Placeholder" settings in the "File" -> Printer Settings" -> "Options" dialog were not taken from the document if A) is enabled. I've changed that so that those are consistent with the others now, s. this commit:
https://gerrit.libreoffice.org/plugins/gitiles/core/+/cef397d0e00fcc3ba7603b1b8e141a10479bb59e ("Load "PrintTextPlaceholder" and "PrintHiddenText" based on config")
Comment 9 Michael Weghorn 2019-11-21 08:19:44 UTC
(In reply to Michael Weghorn from comment #8)
> While doing so, I also realized that the "Hidden text" and "Text
> Placeholder" settings in the "File" -> Printer Settings" -> "Options" dialog
> were not taken from the document if A) is enabled.

Correction: It's the other way around; they were even taken when A) was disabled...
Comment 10 Michael Weghorn 2019-11-21 13:38:51 UTC
Pending fix for the issue described in comment 7:
https://gerrit.libreoffice.org/#/c/83394

AFAICS everything "works as designed" with this patch included, so I'll close this bug as FIXED once the patch is merged. Please speak up (or reopen) if you disagree...
Comment 11 Commit Notification 2019-11-21 18:31:16 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/46f8f48ebfe25e26b4d1c0718c772abbee70b889

tdf#118263 Take over doc print options for new printer

It will be available in 6.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.
Comment 12 Michael Weghorn 2019-11-21 18:33:47 UTC
As far as I can tell, this works as expected now, except that step 1 from the initial description needs to be:

[1] Disable option: Tools > Options … > Load/Save > Load > Uncheck “Load user-specific settings with the document”. Then OK.
Comment 13 Commit Notification 2019-11-21 21:02:44 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/5042375a67a7c7171529abd9724576a269a0c32e

tdf#118263 Take over doc print options for new printer

It will be available in 6.4.0.1.

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 14 Buovjaga 2019-11-22 13:52:35 UTC
(In reply to Michael Weghorn from comment #12)
> As far as I can tell, this works as expected now, except that step 1 from
> the initial description needs to be:
> 
> [1] Disable option: Tools > Options … > Load/Save > Load > Uncheck “Load
> user-specific settings with the document”. Then OK.

I verify, thanks!

Arch Linux 64-bit
Version: 6.5.0.0.alpha0+
Build ID: b30251ca0d102ced36799ee18d4bbcd9e8530fa0
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 22 November 2019