Bug 114663 - No print when you select right or left pages with range of pages start from 47
Summary: No print when you select right or left pages with range of pages start from 47
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.1.0 target:6.0.0.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-12-23 11:45 UTC by Fahad Al-Saidi
Modified: 2022-08-11 10:49 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
A test document for wrong ranges printing (9.37 KB, application/vnd.oasis.opendocument.text)
2017-12-23 14:34 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fahad Al-Saidi 2017-12-23 11:45:23 UTC
When you select some pages bigger than 47 pages to print then you specify in page layout in print dialog to include only right or left pages, there will be no print at all, no thing will send to the printer or even the file if you choose to print to a file.

How to reproduce it:

- open a long doc.

- ctrl+ p to print

- in page layout tab choose to include right or left pages.

- then go to General tab and select a range of pages start from 47, for example 47-50
Comment 1 Mike Kaganski 2017-12-23 13:55:42 UTC
Well... I guess that your document only has less than 94 pages. Because the "Pages" field evidently lists not numbers of pages in document, but numbers of pages in potential print set; i.e., for 100-page document, when you select "left pages", you will have only 50 pages in print set, with "1" in Pages pointing to document's page 2... and so if you enter page no greater than half pages in document, it will have nothing to print.

I don't know what to do with the report. On the one hand, it might be working as intended by author... but that is really counter-intuitive.

Asking UX experts for help.
Comment 2 Fahad Al-Saidi 2017-12-23 14:14:46 UTC
(In reply to Mike Kaganski from comment #1)
> Well... I guess that your document only has less than 94 pages. Because the
> "Pages" field evidently lists not numbers of pages in document, but numbers
> of pages in potential print set; i.e., for 100-page document, when you
> select "left pages", you will have only 50 pages in print set, with "1" in
> Pages pointing to document's page 2... and so if you enter page no greater
> than half pages in document, it will have nothing to print.
> 
> I don't know what to do with the report. On the one hand, it might be
> working as intended by author... but that is really counter-intuitive.
> 
> Asking UX experts for help.

Yes my doc is 92 pages, all what I want is to print a range of pages less than the total of the pages, for me was 77-82. Actually, I want to print into the tow sides of the page, to save papers but my printer doesn't support duplex so I have to do it manually.

I forced to print to pdf then from there I print odd pages then even pages.
Comment 3 Mike Kaganski 2017-12-23 14:28:42 UTC
It is a regression in 5.2;

reproducible with Version: 5.2.1.2 (x64)
Build ID: 31dd62db80d4e60af04904455ec9c9219178d620
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: ru-RU (ru_RU); Calc: group;

good with Version: 5.1.6.2 (x64)
Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: ru-RU (ru_RU); Calc: group
Comment 4 Mike Kaganski 2017-12-23 14:34:11 UTC
Created attachment 138609 [details]
A test document for wrong ranges printing

Steps to reproduce:

Open the attachment; open Print dialog (Ctrl+P); select "Back sides/left pages" on Page Layout tab; go to General tab, and enter 10-20 into the Pages input box.

Expected: number of pages to print should be 6 (10,12,14,16,18,20), which should be visible on the preview pane at the left part of dialog;

Actual: number of pages to print is 11 (20,22,24,26,28,30,32,34,36,38,40)
Comment 5 Mike Kaganski 2017-12-23 15:33:43 UTC
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=3c1a343f6936f1dcefdf79a677f8c26ce29676e6

> author	Eilidh McAdam <eilidh.mcadam@itomig.de>	2015-09-08 19:01:19 +0100
> committer	Jan-Marek Glogowski <glogow@fbihome.de>	2016-01-22 14:22:12 +0000
> commit 3c1a343f6936f1dcefdf79a677f8c26ce29676e6
> tree 1e8a21c764ec489381d6d9c63dacba12e029cbe9
> parent dfbc2f37207f11a3bafb2c5ce0dea4fcc137e527
> tdf#89708 Adjust print page range for unprinted blank pages
> Depending on whether automatically inserted blank pages are to be
> printed or not, the range of pages to print is expressed differently
> to the pages displayed in the preview in the Print dialog - i.e. the
> page range includes blank pages, whereas the preview doesn't (if
> blank pages are not to be printed).
> 
> This patch adapts the range so that if blank pages are ignored upon
> printing, the range can be expressed across printable pages only,
> same as the Print dialog preview.
> 
> An example is a merged document of several records into a single
> page letter or document - blanks are automatically put in between
> documents but usually aren't displayed/printed. Previously,
> printing page 2 would print the blank page between the 1st and 2nd
> merged document. After this change, printing page 2 will print the
> 2nd merged document instead.
> 
> The "Pages" (print range) text box in the Print dialog defaults to
> the current page - this patch adjusts this when blanks are not to
> be printed so that it is expressed as the current page minus any
> blanks since the start of the document.

The even/odd pages chosen to print aren't "automatically inserted blank pages", and although the possible workaround is to enable printing of the automatically inserted pages on LibreOffice Writer tab, current state requires a fix.
Comment 6 Mike Kaganski 2017-12-23 21:50:12 UTC
A patch is in gerrit: https://gerrit.libreoffice.org/47030
Comment 7 Commit Notification 2017-12-25 06:18:01 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=230d3d6602e80fad0ceb700da35fc0c1db28f110

tdf#114663: consider left/right page numbers when not printing blanks

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Fahad Al-Saidi 2017-12-25 06:21:49 UTC
Thanks Mike for the fix. It will be great if it back-ported to 6.0 & 5.4.
Comment 9 Mike Kaganski 2017-12-25 06:26:19 UTC
Cherry-pick to 6-0 is pending review: https://gerrit.libreoffice.org/47053.
Backporting to 5-4 needs some work I cannot do ATM.
Comment 10 Commit Notification 2018-01-09 08:42:39 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f73df3fa98258fb5208a1295c0ae5c56d3c0b315&h=libreoffice-6-0

tdf#114663: consider left/right page numbers when not printing blanks

It will be available in 6.0.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.