Download it now!
Bug 131849 - Mail merge does not reliably apply doc's setting to (not) print empty pages
Summary: Mail merge does not reliably apply doc's setting to (not) print empty pages
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:7.0.0 target:6.4.4
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2020-04-03 09:28 UTC by Michael Weghorn
Modified: 2020-04-07 08:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample doc (1 page) (8.12 KB, application/vnd.oasis.opendocument.text)
2020-04-03 09:28 UTC, Michael Weghorn
Details
Sample mail merge data (4 records) (18.41 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-04-03 09:29 UTC, Michael Weghorn
Details
Sample PPD that can be used to set up a dummy printer on Linux (239.58 KB, text/plain)
2020-04-03 09:29 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2020-04-03 09:28:46 UTC
Created attachment 159289 [details]
sample doc (1 page)

Manual changes to "Print automatically inserted blank pages" are not applied during mail merge when printer properties dialog has been opened as well.

Steps to reproduce:

1) open attached document "testdoc.odt" (or use any other file that has just a single page)
2) open printer settings dialog: "File" -> "Printer Settings..."
3) select "Properties..." to open the printer properties dialog
4) don't change anything, select "OK"
5) select "Options..." to open dialog for document-specific print options
6) unselect "Print automatically inserted blank pages", select "OK"
7) select "OK" to confirm and close the dialog
8) run LO mail merge wizard ("Tools" -> "Mail Merge Wizard"), using the attached sample data "4_v01.ods" which has 4 records
9) Select "Print Merged Documents" in the mail merge toolbar and print
10) check the printout

Result: The printout contains automatically inserted blank pages.

Expected result: The printout should not contain extra blank pages, because the corresponding option has been unselected in step 6.


Further notes:

1) When leaving out step 3 and 4 from description above, the issue is **not** reproducible.
2) The above steps apply for a fresh user profile (having a different default value for "Print empty pages" in Writer's options may change behaviour)
3) The issue can be reproduced without doing actual printouts by setting up a dummy printer on Linux that prints to a file using the attached PPD File "tofile-dummy.ppd" as follows:

* set up printer:
  sudo lpadmin -p tofile-dummy -v file:/tmp/tofile-dummy -P <PATH_TO>/tofile-dummy.ppd

* set as default printer (so it's preselected in LO):
  lpoptions -d tofile-dummy

* run the steps described above to reproduce the issue

* check the PDF file that LO generates for printing in directory `/var/spool/cups/`. The blank pages are visible there when opening the file in a PDF reader. (and 'pdfinfo <FILE> says that the file has 7 pages, while it should only have 4)
Comment 1 Michael Weghorn 2020-04-03 09:29:15 UTC
Created attachment 159290 [details]
Sample mail merge data (4 records)
Comment 2 Michael Weghorn 2020-04-03 09:29:50 UTC
Created attachment 159291 [details]
Sample PPD that can be used to set up a dummy printer on Linux
Comment 3 Michael Weghorn 2020-04-03 09:30:56 UTC
I'm self-confirming according to [1] since the issue has originally been reported by somebody else in our internal issue tracker.

[1] https://wiki.documentfoundation.org/QA/Guidelines_for_public_and_private_sector_deployments
Comment 4 Michael Weghorn 2020-04-03 09:32:35 UTC
Version: 7.0.0.0.alpha0+
Build ID: aa24771563425072c710e8c426323ed311437f13
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: kf5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded

I'm currently looking into the issue.
Comment 5 Commit Notification 2020-04-03 13:23:56 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/21fc54777d5dedc33d6bfa23b9f1072a6667eebe

tdf#131849 Handle changed doc print options when printer changed

It will be available in 7.0.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 6 Michael Weghorn 2020-04-03 13:38:46 UTC
Fixed in master, backport for 6.4 pending at https://gerrit.libreoffice.org/c/core/+/91519
Comment 7 Commit Notification 2020-04-07 08:19:39 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/eb40f8ba7d55489bd8bc2f8940dc5829402cded8

tdf#131849 Handle changed doc print options when printer changed

It will be available in 6.4.4.

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.