Download it now!
Bug 98900 - print selection filter does not recalculate statistics against just the selection, so prints with incorrect field data for the whole document
Summary: print selection filter does not recalculate statistics against just the selec...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields Print
  Show dependency treegraph
 
Reported: 2016-03-26 09:23 UTC by Paolo Benvenuto
Modified: 2020-03-09 13:28 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
example document (12.07 KB, text/odt)
2016-04-05 12:02 UTC, Timur
Details
selection printed from example document (24.06 KB, application/x-force-download)
2016-04-05 12:02 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Benvenuto 2016-03-26 09:23:24 UTC
I have a multipage document.

If I print with page range, page numbers are printed correctly.

If I select text across pages and print selection only, all pages get last page number.
Comment 1 Timur 2016-03-28 17:28:17 UTC
When reporting a bug you should "Write the expected behavior and the actual behavior", per https://wiki.documentfoundation.org/QA/BugReport
Here there's no expected behavior, so: how else could this be done and why? Maybe page number or header/footer shouldn't be printed at all. 
I tried MSO, it doesn't let you print selection from multiple pages.
Comment 2 Paolo Benvenuto 2016-04-01 13:31:01 UTC
I expect correct page numbers are printed
Comment 3 Timur 2016-04-04 10:46:28 UTC
Please attach a multi-page document, select text across pages and print selection only, and attach image how page numbers should look (you may add not on printscreen). 
The only thing that comes to mind is to have sth. like "1, 3, 7".
Comment 4 Paolo Benvenuto 2016-04-04 11:19:42 UTC
I don't understand, with a document which has 86 pages, the screenshot I could attach simply would have 86 on all pages.

I expect that if the selection goes from page 33 to page 35, the numbers 33, 34, 35 appear on the printed pages
Comment 5 Timur 2016-04-05 12:02:11 UTC
Created attachment 124084 [details]
example document
Comment 6 Timur 2016-04-05 12:02:54 UTC
Created attachment 124085 [details]
selection printed from example document
Comment 7 Timur 2016-04-05 12:07:19 UTC
Instead of page number, say 3, it would be nice if there were "Selection from pages 1, 2, 3" because it's not pages 1, 2, 3 that are printed, but some selection out of them. 
I don't know whether this is possible, so let's wait for someone to confirm.
Comment 8 Robinson Tryon (qubit) 2016-08-25 05:49:44 UTC Comment hidden (obsolete)
Comment 9 Aron Budea 2016-09-18 15:14:08 UTC
I'm not UX, but I think Timur's suggestion from comment 7 makes a lot of sense, so I'm setting this to NEW in the meantime.
Comment 10 Yousuf Philips (jay) (retired) 2016-09-19 02:08:28 UTC
I would assume that it would print brand new pages numbers starting from 1, as a selection has no page boundaries and would likely be similar to copying and pasting that selection into a new document and then printing.
Comment 11 Aron Budea 2016-09-19 02:27:07 UTC
At first I thought it would be cool if each page listed all the pages its content came from, but I understand it's somewhat tricky, and not everyone might like it (not to mention pathological cases, like selecting dozens of lines from different pages).
Starting from 1 seems feasible.
Comment 12 V Stuart Foote 2016-09-19 12:30:06 UTC
(In reply to Yousuf Philips (jay) from comment #10)
> I would assume that it would print brand new pages numbers starting from 1,
> as a selection has no page boundaries and would likely be similar to copying
> and pasting that selection into a new document and then printing.

That would be my expectation as well.

Seems the print selection filter is not correctly handling the Document data fields--rather than recalculating for just the "print selection", it is assigning the values from the entire document.

The page count is from Statistics -> Pages field. The page number is from the Page -> Page numbers--IIUC the page number is a moving pointer to the next page to be assigned at the end of the source document, so end up the same for the print selection.

Find that if fields for other document Statistics are included in the selection--they also are not recalculated to match the selection, and print with incorrect values. So in addition to Pages, at least Paragraphs, Words, and Characters are likewise incorrect for the print selection.
Comment 13 Heiko Tietze 2016-12-29 10:57:12 UTC
When a selection of pages (like 2-3 or 2,4) is printed the page number is exported correctly. So why should a selection start with 1? (And actually it takes the last page number in my test.) The trick is that you can select parts of page 1 and something from page 3 etc., which is combined together into a new page. So I agree with Jay and Stuart that starting new with 1 is the best choice.

Removing needsUX now.
Comment 14 QA Administrators 2017-12-30 03:29:13 UTC Comment hidden (obsolete)
Comment 15 Xisco Faulí 2020-03-09 13:28:44 UTC
Please add keyword 'needsUXEval' and CC 'libreoffice-ux-advise@lists.freedesktop.org' if input from UX is needed.