Issue 125600 - Page numbers inconsistency between table of content and actual document
Summary: Page numbers inconsistency between table of content and actual document
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 4.1.1
Hardware: PC Windows 7
: P3 Major with 4 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-08 21:39 UTC by Alain Baudhuin
Modified: 2014-09-10 19:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Alain Baudhuin 2014-09-08 21:39:01 UTC
See attached document PageNumberingIssue.odt: 

1. Open document
2. Note that the last entry in TOC (section 4) is on page 47.
3. Scroll down the document: at first, the last page is indeed 47/47. After about 1 minute (after automatic pagination), the last page becomes 49/49.
4. Update the TOC: no change: last entry remains at page 47.
5. Go to "print preview" (button in the toolbar): pagination is consistent again, page numbers are normal, from 1/47 to 47/47.
6. Generate pdf file with the toolbar button: in the resulting pdf file, pages number go from 1/47 to 12/47 and then jump to 15/49. The last page is 49/49 (2 pages gap both in the page numbers and page count). 

The same procedure always result in a pdf file with the 2 pages gap, although the position of the gap varies: another attempt caused the gap to be between pages 9/47 and 12/49.

Note about the document: it uses conditional paragraphs and sections using variables defined in the very first frame (the blue one on top of the document). The content of the frame is hidden: display non printable characters to access it.
Comment 1 Alain Baudhuin 2014-09-08 22:17:38 UTC
File demonstrating the problem (PageNumberingIssue.odt) + 2 generated pdf files are available at http://www.cspu.be/~baudhuina/openofficeIssue125600/
Comment 2 oooforum (fr) 2014-09-10 09:37:36 UTC
I don't know how has been designed your document but the problem is inside.
I opened a new ODT and pasted the content via Insert > File menu
The TOC is correct
Comment 3 Alain Baudhuin 2014-09-10 18:29:22 UTC
I tried the workaround but it did not fix the problem. Here is what I did (all files are available at http://www.cspu.be/~baudhuina/openofficeIssue125600/):

1. Created a blank document (not from a template)
2. Insert->File (inserted document PageNumberingIssue.odt).
3. Added standard footer and included PageNumber/NumberOfPages in the footer.
4. Updated the TOC: 
TOC shows the last entry on p51, while in the document that last entry is on page 53/53.
Resulting file is AfterImportingFileIntoBlankDocument.odt.
5. Go to print preview: last page is now 49/49, TOC still refers to p.51
6. Generated a pdf file from the print preview: Crashes OO Writer!
7. Opened the file again: last page is 52/52 or 53/53 (obviously unstable) while the updated TOC always refers to p.51 as the last one.
8. Generated a pdf file from the normal view several times. One time, I got a correct pdf (file AterImportingFileIntoBlankDocument.pdf. All other attemps resulted in pdf file with incorrect page numbers (see AfterImportingFileIntoBlankDocument2nd.pdf: TOC refers to page 51, while last page is 49/49.

Alain.
Comment 4 Regina Henschel 2014-09-10 19:53:15 UTC
I can confirm the unstable pagination with the provided document. When your cursor is at heading of chapter 1.5 and you wait some time, you will notice that the page content jumps and so causing jumps in page number. But I do not find a definite element which is turned on/off or swapped in/out or something similar.

I use AOO420m1(Build:9800)  -  Rev. 1620195 on Windows 7.