Bug 140240 - Add Reset Printer to File > Properties > General to remove printer info from settings.xml
Summary: Add Reset Printer to File > Properties > General to remove printer info from ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice, security
Depends on:
Blocks: Print
  Show dependency treegraph
 
Reported: 2021-02-07 15:17 UTC by Telesto
Modified: 2022-08-10 19:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-02-07 15:17:33 UTC
Description:
Disable the storing printer inside document (PrinterName in settings XML) of ODT (leaving it empty) by default (or removal)

Steps to Reproduce:
1. Open Writer
2. Create a document & save (make an copy an extract settings.xml) notice PrinterName empty
3. Now Press Printer.. Pick a printer (lets say PDF printer) & send print job.
4. Notice that no document change (desired)
5. Save the file again. And look at the XML.. Now printer name is stored


Actual Results:
Printer name embedded in file

Expected Results:
Many things wrong with this:
A) Doesn't work all the time -> As printer doesn't trigger a change; probably disabled somewhere for the reason no change is expected)
B) Kind of privacy issue. Yes, I like clean documents
C) Apparently No Printer is stored too https://www.phoronix.com/forums/forum/software/general-linux-open-source/1236159-libreoffice-7-1-community-edition-released?p=1236179#post1236179)
D) It might trigger a search for non-available or badly available printer
E) Not sure what happens when sharing the file outside the editors environment. So it will pick-up any printer with the same name on any system?

So prefer to disable to whole fuzz by default. Broken anyhow.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3ed9bba283a6a67864c0928186e277240be0d9ba
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
Comment 1 Dieter 2021-08-28 10:29:29 UTC
I confirm the described behaviour with

Version: 7.2.0.3 (x64) / LibreOffice Community
Build ID: 2a7ea282da28d665a7dc086360567b4aea27bf08
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

but I can't decide, if this should be considered as a bug or not.
Comment 2 Telesto 2021-08-28 17:41:10 UTC Comment hidden (obsolete)
Comment 3 Heiko Tietze 2021-08-30 12:27:33 UTC
Use case is clear to me: convenience feature in case of more than one printer (eg, b/w and color) or formatting prerequisite (eg. letter vs. a4). Have you tried to reset file > properties?
Comment 4 Telesto 2021-08-30 12:42:26 UTC Comment hidden (obsolete)
Comment 5 Heiko Tietze 2021-08-30 13:16:13 UTC Comment hidden (obsolete)
Comment 6 Telesto 2021-08-31 17:02:42 UTC
(In reply to Heiko Tietze from comment #5)
> > (In reply to Heiko Tietze from comment #3)
> > > Have you tried to reset file > properties?

No, but now I did :-).. And doesn't make any difference..
Comment 7 Heiko Tietze 2021-09-01 09:17:17 UTC
Uncheck "[ ] Apply user data", Reset Properties and Save. But... this does not clean up <config:config-item config:name="PrinterName"... and  <config:config-item config:name="PrinterSetup". 

Having difficulties to test the issue since I have only one printer connected. Printing a new document to PDF keeps this printer as default (probably set via File > Printer Settings). It seems to me that we mix two features.

If you talk about the number of print outs shown on the properties dialog, this should be cleared with the reset function. If this is about the default printer, I cannot test how it behaves on different workstations/users. Would expect the printer to follow the workstation setting, or what is stored in the document. If the stored parameter doesn't match the current environment it takes the default.

Don't see an issue here, maybe privacy.
Comment 8 Telesto 2021-09-01 11:07:26 UTC
(In reply to Heiko Tietze from comment #7)
> Uncheck "[ ] Apply user data", Reset Properties and Save. But... this does
> not clean up <config:config-item config:name="PrinterName"... and 
> <config:config-item config:name="PrinterSetup". 
> 
> Having difficulties to test the issue since I have only one printer
> connected. Printing a new document to PDF keeps this printer as default
> (probably set via File > Printer Settings). It seems to me that we mix two
> features.

I'm printing to a PDFPrinter.. doesn't matter. It might matter if you press save after print.. {Print doesn't trigger a change, which is weird if you desire to save printer status inside a document..[


> 
> If you talk about the number of print outs shown on the properties dialog,
> this should be cleared with the reset function. 

No

> If this is about the default printer, I cannot test how it behaves on different workstations/users. Would > expect the printer to follow the workstation setting, or what is stored in > the document. If the stored parameter doesn't match the current environment > it takes the default.

Well, say you have the Printer with same name by accident.. however in a different environment.. take lovely network printer with hell of a lag.. that will be the default (if stored in file).

If there is no match, it's probably obsolete..


> Don't see an issue here, maybe privacy.
Well printers (or maybe I'm confusing the Printer spoolers mess) are an attack vector. Printer means drivers.. drivers means bugs.. bugs means.. access point.. Obviously a long shot :-)

--
Major point.. What's the history related to this feature. What was the initially idea and context. And does it match today's world.

It might had a propose (sense), but does it still hold true?
Comment 9 Telesto 2021-09-03 08:34:26 UTC Comment hidden (obsolete)
Comment 10 Mike Kaganski 2021-09-03 08:46:11 UTC
(In reply to Telesto from comment #6)
> (In reply to Heiko Tietze from comment #5)
> > > (In reply to Heiko Tietze from comment #3)
> > > > Have you tried to reset file > properties?
> 
> No, but now I did :-).. And doesn't make any difference..

This is definitely a problem to solve anyway.

The reason for storing the printer data with the document is to allow the manual configuration of print settings to be stored per-document, which may be super-useful for non-default non-trivial cases like printers needing special setup for brochure printing. (No idea how working/broken the current state is; just describing the idea.) Tools that may require non-default printer processing often have such things (Autocad/DWG comes to mind); some (no idea what proportion though) LibreOffice users definitely may take advantage from this.
Comment 11 Timur 2022-08-10 10:09:13 UTC
This bug is still Unconfirmed and a decision needs to be taken. 
I will not confirm bug as asked (not storing printer by default) but I will confirm enhancement like this (unless explained differently):
Add Reset Printer to File > Properties > General to remove printer info from settings.xml

Related to Comment 7, Reset Properties will now not remove printer section from the file but can replace it with the new default printer. 
That's one of workarounds for bug 42673 but not a solution for this one.
Comment 12 Timur 2022-08-10 19:26:26 UTC
Today I saw that default printer was added into document on a simple save, without print. 
That should be changed, no need to add printer if not printed.