Created attachment 196810 [details] Screenshot show a 2-page document, 2nd page has 'Page Number' and 'Page Count' fields showing '1' and '3' respectively Steps to reproduce: 1. Open a new document in Writer 2. Insert a 'Page Count' field 3. Create a page break 4. Edit the page break to restart page numbering at '1' 5. Observe the 'Page Count' to be 3, instead of the expected 2. (Optionally, also insert a 'Page Number' field) 6. Edit the page break to restart page numbering at '0' 7. Observe the 'Page Count' to now be the expected value of 2 (but with the side effect of all subsequent page numbers are 1 below what they ought to be).
Maybe https://ask.libreoffice.org/t/how-to-stop-page-number-restarts-no-answers-found-for-this-build/42659 explains the issue. If not Please attach a sample file, reduce the size as much as possible without private information, and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Created attachment 196831 [details] Sample file showing bug Attached a ODT Document containing 2 pages, with a page break that re-starts the page numbering, with a 'Page Count' field on the 2nd page showing value '3'.
LibreOffice version details, as requested: Version: 24.8.2.1 (X86_64) / LibreOffice Community Build ID: 480(Build:1) CPU threads: 16; OS: Linux 6.10; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-GB Debian package version: 4:24.8.2-1 Calc: threaded
[Automated Action] NeedInfo-To-Unconfirmed
Created attachment 196843 [details] Screenshot of the paragraph style There is a page break on the paragraph style.
Correct, there is. But that, it seems, is how Writer creates a page break. Every method I know of (Insert->Page Break, Insert->Manual Break, Ctrl-Return, or editing a paragraph style) to create a page break attaches it to the paragraph styling of the paragraph either immediately before or after the break, visually, occurs. When you go to edit the page break, it brings up the 'Paragraph' window shown in both our screenshot images attached to this report, regardless of the method used to create the break in the first place, as the break it attached to a paragraph's style.
This is intentional, but see bug 153259. Quoting some comments from the dev chat: "expected behaviour - in print a work with a change from an odd to an odd page number will have an empty page in between, and that is usally counted in the total number" "in Writer, between two odd pages, there will always be an even one (maybe automatic blank); same between two even pages."
(In reply to Krystal from comment #0) > Observe the 'Page Count' to be 3, instead of the expected 2. 3 is to be expected - it is indeed the page count. It's not supposed to be the "number which would appear on the last page if we continued this page sequence all the way to the end". (In reply to Buovjaga from comment #7) > "in Writer, between two odd pages, there will always be an even one (maybe > automatic blank); same between two even pages." I don't think the oddness/evenness is the issue here.