Bug 52316 - UI: Page count in Status bar does not respect setting "Print automatically inserted blank pages"; Incorrect value for page count field (see comment #16)
Summary: UI: Page count in Status bar does not respect setting "Print automatically in...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0
Keywords:
: 57710 60594 95172 96123 (view as bug list)
Depends on:
Blocks: Statusbar Page
  Show dependency treegraph
 
Reported: 2012-07-20 17:43 UTC by SACL
Modified: 2021-10-17 09:51 UTC (History)
15 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of problem (475.48 KB, application/vnd.oasis.opendocument.text)
2012-07-24 23:17 UTC, SACL
Details
empty test case.odt (10.04 KB, application/vnd.oasis.opendocument.text)
2014-11-19 14:59 UTC, Timur
Details
Extended status bar, when the actual printer setting of the document results different page counts (70.31 KB, image/png)
2019-10-04 13:02 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SACL 2012-07-20 17:43:32 UTC
Dear

When setting up the first page as initial cover, corrupts the total page count.

The Windows XP version is 3.5.5 and 3.5.4 linux is Wheezy.

Atte.
SACL
Comment 1 Urmas 2012-07-21 10:14:58 UTC
Which title options did you use and how exactly it is "corrupted"? By default, there will be 1 invisible page after the title one which will be included in numeration.
Comment 2 SACL 2012-07-24 23:17:01 UTC
Created attachment 64636 [details]
Example of problem

Lookup the foot page. El total page is with error.
Comment 3 SACL 2012-08-01 21:24:40 UTC
(In reply to comment #1)
> Which title options did you use and how exactly it is "corrupted"? By default,
> there will be 1 invisible page after the title one which will be included in
> numeration.


Play problem

1) Document with at least 2 pages.
2) While page 1, insert a page break.
3) Then go to Format -> set title page:
- Convert existing pages in title
- Restart Numbering of pages after the title ... [1].
4) OK
5) You will now see the total pages 3, where the total is 2.

SACL
Comment 4 bfoman (inactive) 2013-03-06 12:30:29 UTC
Checked with:
LO 4.0.1.2
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

After opening the attachment:
clicked on - status bar display - footer display
1st page - Page 1/4
2nd page - Page 1 3/4 - Pagina 1
3rd page - Page 2 4/4 - Pagina 2
Comment 5 A (Andy) 2013-04-13 20:33:17 UTC
buggy behavior reproducible with LO 4.0.2.2 (Win7 Home, 64bit)

I have the same result as mentioned by bfoman.
Comment 6 Timur 2014-10-28 15:25:08 UTC
https://wiki.documentfoundation.org/ReleaseNotes/4.4 says:
Page number in the statusbar are more easily understood when page number styles are used: Bug 80617
Can you please test with the master?
Comment 7 Timur 2014-11-19 14:42:34 UTC
Checked with: LO 4.4.0 alpha2
After opening the attachment:
clicked on - status bar display - footer display
1st page - Page 1 of 4
2nd page - Page 3 of 4 (Page 1)
3rd page - Page 4 of 4 (Page 2)

Page break with "Change page number" inserts a blank page after, except after Default Style.

Problem here is, and it's not so simple when the document is larger: 
- if you want to print or export the whole document, as previewed, you need to untick "Export automatically inserted blank pages"
- if you want to print or export specific pages, for example only 2nd and 3rd page, you have to use "Export automatically inserted blank pages" and select pages 3-4 (from footer display, because that's what you see)

It's not obvious and takes time and experiments to be understood. 
I have to export to PDF and only then print that PDF if I have document like this.

What's the solution? Obviously, not count nor output the blank pages. Is it possible? 

Bug 52316 (earlier) and bug 57710 (more complex case and explanation) refer to the same problem, so one should be marked as a duplicate. I suggest bug 57710 be marked as later.
Comment 8 Timur 2014-11-19 14:59:57 UTC
Created attachment 109735 [details]
empty test case.odt

This test case document is shown as 7 pages. 
- How do you know it has 5 pages for printing?
- In order to print "text" and "landscape" only you need to select pages 3-4,7 with "Export automatically inserted blank pages" which is not enabled by default (it it were, it would make a problem for the whole document printing).
- There's another problem with Page Count and Page Number fields. How do you get, for example in "text", as in footer: Page 1 in section, Page 4 of 7 in document?
Comment 9 Timur 2015-04-15 09:28:08 UTC
*** Bug 57710 has been marked as a duplicate of this bug. ***
Comment 10 emmanuel.blanchard 2015-10-21 08:22:03 UTC
*** Bug 95172 has been marked as a duplicate of this bug. ***
Comment 11 Cor Nouws 2015-11-30 12:11:54 UTC
*** Bug 96123 has been marked as a duplicate of this bug. ***
Comment 12 Cor Nouws 2015-11-30 12:13:42 UTC
quoting https://bugs.documentfoundation.org/show_bug.cgi?id=96123#c5

"Note that the setting is in Writer > *Print*
So it is obvious that there is a design choice for this.

In addition one could for example argue that this effect (page count in status
bar) is a trigger to become aware of the automatically inserted blanc pages.
I do not remember that this has been ever proposed (but may be wrong) and the
behaviour is like this for a long time."
Comment 13 Robinson Tryon (qubit) 2016-08-25 05:49:45 UTC Comment hidden (obsolete)
Comment 14 Julien 2016-12-12 20:41:21 UTC
Hi,
Bug still present in LibreOffice 5.2.3.2 (on ubuntu yakkety, Build ID: 1:5.2.3~rc2-0ubuntu1~yakkety1)
Regards, Julien
Comment 15 Gabor Kelemen (allotropia) 2018-02-06 10:19:22 UTC
*** Bug 60594 has been marked as a duplicate of this bug. ***
Comment 16 Cor Nouws 2018-02-06 20:20:55 UTC
(from the duplicate issue )

So currently the status bar info on the second page in view is
"Page 3 of 3 (Page 1)"
This independent of the setting "Print automatically inserted blank pages"
(The "(Page 1)" is irrelevant for this issue - it is displayed to show the page number as set by the user.)

The request is
option active:
  "Page 3 of 3 (Page 1)"
option disabled
  "Page 2 of 2 (Page 1)"

That sounds good.

I do not see any problems with Export to PDF?
Then, on the first tab, one can set "Export automatically inserted blank pages"
Choosing that on export, will not change the numbering of pages (as set by the user with fields in e.g. the footer.)
Comment 17 Heiko Tietze 2018-02-21 19:37:43 UTC
Agree with Cor's analysis in comment 16. Sounds more natural to me when we reverse the logic into  "1 of 2 pages (plus 2 blank)".
Comment 18 Mike Kaganski 2018-03-11 11:04:50 UTC
I'd prefer to not have those blanks mentioned (and accounted for) anywhere, including preview and status bar, but instead, have a print option that would read something like "use double-sided printing", which would just ensure that even pages are printed on even sides, and odd are printed on odd sides (i.e., only in this printing mode, the blanks were inserted).
Comment 19 Commit Notification 2019-10-04 12:51:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#52316 Writer status bar: show also printed page counts

It will be available in 6.4.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 20 László Németh 2019-10-04 12:52:39 UTC
tdf#52316 Writer status bar: show also printed page counts

if they are different from the "normal" page counts.

If the document contains automatically inserted blank
pages, and the document setting "Print automatically
inserted blank pages" is disabled, the status bar still
shows page counts with blank pages. This is a problem
especially, if the user wants to print a document range,
because it's not possible to read the correct printing
range from the status bar, and using the showed values,
printing can result unwanted and missing printed pages
without any notice if the Preview option is disabled
in the Print dialog window (otherwise if the difference
was noticed, it could be hard or near impossible to
correct the range using the Preview window).

Now, for example, if the title page followed an
automatically inserted blank page and a third page,
the status bar shows the following on the third
page, if there is a difference in printing:

Page 3 of 3 (Page 2 of 2 to print)

If the setting "Print automatically inserted blank
pages" of the actual document is enabled on page
"LibreOffice Writer" of the File->Print... dialog
window, or the document doesn't contain automatically
inserted blank pages, there is no information
about printed pages in the status bar (because there
is no difference in page counting):

Page 3 of 3
Comment 21 László Németh 2019-10-04 12:55:46 UTC
Notes: DOCX documents always get the document setting "Print automatically
inserted blank pages", so the status bar doesn't show printed page counts.
Comment 22 László Németh 2019-10-04 13:00:57 UTC
To test using the test document of Bug 31606:

1. download and open http://www.pitonyak.org/AndrewMacro.odt

2. disable its document setting "Print automatically inserted blank
pages" on page "LibreOffice Writer" of the File->Print... dialog window.

3. Go to the Page 355. The status bar shows

"Page 355 of 540 (Page 350 of 523 to print)"

(As on the attached screen shot).
Comment 23 László Németh 2019-10-04 13:02:14 UTC
Created attachment 154759 [details]
Extended status bar, when the actual printer setting of the document results different page counts
Comment 24 sdc.blanco 2020-02-07 21:30:17 UTC
>Affected users are encouraged to test the fix and report feedback.
Neutral report on observed behavior (i.e., no opinions or suggestions) 
Using a 15-page test document with a variety of page numbering resets, and 7.0.0.0.alpha0+ (x64),  Build ID: dfd027342e6b4107ebd3369de96ef2be3883724d

Procedure: 
File > Printer Settings – Options button, then unclick ‟Print automatically inserted blank page”, then OK
 
(also works with File→Print - Writer tab – unclick - Cancel – [one less dialog box] )

With  ‟Print automatically...” ‟unclicked”

Status bar shows:  Page 1 of 15 (Page 1 of 13 to print)  
                    (and keeps that appearance in scrolling through entire file)
                    (no indication of values for Page Number variable)

With  ‟Print automatically...” ‟clicked”

Status bar shows:   Page 1 of 15    
            (keeps that appearance, until coming to a page with numbering reset) 
 
            (after pagenumbering reset)

Status bar shows:    Page 1 of 15 (Page x)    
                        (where x is the value of the Page Number variable)

Additional information:  

1. The ‟clicked” case is also the same behavior for all cases – clicked and unclicked –  in LO 6.3.4.2 

2. File → Print Preview  (statusbar does not depend on ‟Print automatically...” setting)
Uses style shown in comment 4:    P   x/y
                            where P= ‟Page number value”, x = document page, y = total number of pages

3.  The setting in Tools – Options – Writer – Print has no effect.  As far as I can tell (empirically), the only thing the Option does is specify the initial setting for a new document. From that point of view, the help page gives incorrect information:
  https://help.libreoffice.org/7.0/en-US/text/shared/optionen/01040400.html
Comment 25 Timur 2021-03-25 10:16:52 UTC
My proposal for further improvement is to make it easier to change "Export automatically inserted blank pages" settings.
To add right-click to Status bar where user could change settings for print and export (so needed are two check boxes).
I wrote it in bug 126284.
Comment 26 christianarcadio311 2021-10-17 09:50:37 UTC
Is there currently a workaround on this? it really makes it very easy to forget updating the page count in documents.
Comment 27 christianarcadio311 2021-10-17 09:51:03 UTC Comment hidden (obsolete)