Bug 98698 - Multiple blank pages are inserted / Page count increases in a document with many images
Summary: Multiple blank pages are inserted / Page count increases in a document with m...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap Writer-Page-Break Additional-Blank-Pages
  Show dependency treegraph
 
Reported: 2016-03-16 02:28 UTC by HD
Modified: 2022-01-24 12:09 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
document with many images (40.34 KB, application/vnd.oasis.opendocument.text)
2016-03-16 02:28 UTC, HD
Details
Writer inserting blank pages at random in document (3.61 MB, application/vnd.oasis.opendocument.text)
2019-09-07 19:50 UTC, 1000dead
Details
erratic page count (60.10 KB, image/png)
2021-02-05 16:50 UTC, 1000dead
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HD 2016-03-16 02:28:16 UTC
Created attachment 123613 [details]
document with many images

When you insert new page in a document with many images, multiple blank pages are inserted and page count increases uncontrollably.

Steps to reproduce:
1. Open attached document.
2. Place your cursor on the top of page 2 and insert page with [Ctrl]+[Enter] key.

Current behavior:
Page count increases from 15 to 21.

Expected behavior:
Page count increases from 15 to 16.

Workaround:
Switching from edit mode to Print Preview several time.
You need to do this every time page count changes.

OS: Windows 7
Version: 5.0.4.2
Build ID: 2b9802c1994aa0b7dc6079e128979269cf95bc78
Local: ja-JP (ja_JP)

This issue is inherited from OpenOffice.
https://bz.apache.org/ooo/show_bug.cgi?id=121546

Best regards.
Comment 1 Usama 2016-03-17 17:32:29 UTC
I can reproduce the page count increase on master.
I could not get the workaround to work.

Version: 5.2.0.0.alpha0+
Build ID: 6eb7cd38e348e8a9d6498bfc2d41e91725eb34aa
CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-03-16_12:53:35
Locale: en-US (en_US) OS: Windows 7 Enterprise

and on

Version: 5.2.0.0.alpha0+
Build ID: aaca25d67eb5ea252730cdcf555ecc04ce04a5e6
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-02-24_23:58:47
Locale: en-US (en_US.UTF-8)
OS: Ubuntu 15.01

and on 5.0.5 Ubuntu 15.10

Leaving it to Unconfirmed for further investigation as this file could have some formating issue that caused this problem.
Comment 2 Buovjaga 2016-03-24 17:25:21 UTC
Repro. Let's set to NEW.
Unable to get workaround working.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.0.0.alpha0+
Build ID: 8d267cdd48e8b736a81a9e76ea5803e6847d791e
CPU Threads: 8; OS Version: Linux 4.4; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on March 24th 2016
Comment 3 Justin L 2016-08-12 12:50:55 UTC
bibisect43all - problem goes back all the way as far as I can test in 16.04 (last36onmaster).

In case this helps, page2 (which becomes page3 after inserting the page break) stayed the same (paragraph, picture, paragraph) up until it contained a single paragraph only sometime in the 3 days between bad commit:
author	Markus Mohrhard <markus.mohrhard@googlemail.com>  2012-08-31 13:50:15 (GMT) commit 3cf91a21fc5089fb7f051bf8a04d2049da88179f
use Red as error color for cond format dlg

and good commit:
David Tardon <dtardon@redhat.com> 2012-08-29 06:20:33 (GMT) commit e19f1afb2c253944968f85b963934a60b87f472a
fix typo
Comment 4 QA Administrators 2017-09-01 11:20:43 UTC Comment hidden (obsolete)
Comment 5 Thomas Lendo 2017-10-08 20:40:16 UTC
Still repro.

Version: 6.0.0.0.alpha0+
Build ID: 74b47af9885ba4c59195fedc1e0510b8b056a025
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); Calc: group
moggi's auto updater build, 2017-10-08

Additional weird thing: If you undo step 2, the 19 pages still exist--but empty.
Comment 6 H.C Hsu 2018-11-29 09:17:51 UTC
A problem different from original one still exists in version 6.3.0.0.
As the last user's result, the numbers of pages will from 15 to 19.

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded
Comment 7 1000dead 2019-09-07 19:50:07 UTC
Created attachment 154009 [details]
Writer inserting blank pages at random in document

I have a number of odt files that I work on regularly, most of them are between 200 and 500 pages with a mix of text and embedded images. As I move around editing text, that new text will of course fill a page and flow to the next one moving everything along and increasing the page count by one as normal. However, at random times a blank page would creep in somewhere below which has no data or can be edited, its almost like a graphics glitch, a blank page inserted at random perhaps many pages below I was originally editing perhaps but never above. I assumed this was some bad formatting on my part causing the issue at first, but after a year of this it looks like a bug.

Recently the issue has become much more apparent slowing down workflow greatly, when the problem now happens and say I insert just even one single new page in a 500 page document or image, the whole document can suddenly balloon into 600 pages with new blank pages scattered all over. Nothing seems to be corrupted and indeed if I save the document and open it later, those blank pages are gone. I have tried copying the contents into a fresh document, but sooner or later the issue arises again.

I have included a sample file which has the problem (I've tried to sanitise the data somewhat in the file for privacy)

Libreoffice version:
Version: 6.2.7.1
Build ID: 6.2.7-1
CPU threads: 4; OS: Linux 5.2; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded


OS: Linux 0 5.2.11-arch1-1-ARCH


Thanks for your time.
Comment 8 1000dead 2020-02-04 21:39:11 UTC
Problem of random blank pages appearing when editing a document still persists with updated Libreoffice:

Version: 6.3.4.2.0+
Build ID: 6.3.4-2
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded


OS; Linux 0 5.4.15-arch1-1

Thanks
Comment 9 Timur 2020-02-13 13:03:27 UTC
First attachment 123613 [details] page count increased from 15 to 21, than to 19, than with 6.2.8. to 17 and now with 7.0+ to 18 (undo gives 16).

Attachment 154009 [details] is not sure to be the same bug, doesn't have steps to reproduce.
Comment 10 Telesto 2020-04-25 21:23:19 UTC
(In reply to Timur from comment #9)
> First attachment 123613 [details] page count increased from 15 to 21, than
> to 19, than with 6.2.8. to 17 and now with 7.0+ to 18 (undo gives 16).

The cause image anchoring. The anchors aren't 'stable'. Move a few of the large images around a reshuffle occurs. Press CTRL+Z and layout is different again (page numbers). Table splitting has it's quirks too.

Versie: 6.4.3.2 (x64)
Build ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
CPU-threads: 4; Besturingssysteem: Windows 6.3 Build 9600; UI-render: GL; VCL: win; 
Locale: nl-NL (nl_NL); UI-taal: nl-NL
Calc: CL
Comment 11 1000dead 2020-05-06 15:00:05 UTC
The problem still persists for me with an upgrade of Libreoffice. I tried looking for new answers and found https://odfvalidator.org which was very useful. I tried one of my problem documents with the validator and found repeated errors throughout the file, 369 errors errors to be exact, below is a shortened sample of the validator output:

The document is NOT conformant ODF1.2!

Document.odt: Info: ODF version of root document: 1.2
internal:/schema/odf1.2/OpenDocument-v1.2-os-manifest-schema.rng: Info: parsed.
Document.odt/META-INF/manifest.xml: Info: no errors, no warnings
Document.odt/mimetype: Info: no errors, no warnings
Document.odt: Info: Media Type: application/vnd.oasis.opendocument.text
internal:/schema/odf1.2/OpenDocument-v1.2-os-schema.rng: Info: parsed.
Document.odt/meta.xml: Info: Generator: LibreOffice/6.2.7.1$Linux_X86_64 LibreOffice_project/20$Build-1
Document.odt/meta.xml: Info: no errors, no warnings
Document.odt/settings.xml: Info: no errors, no warnings
Document.odt/styles.xml[2,4887]: Error: unexpected attribute "loext:contextual-spacing"
ng="false" fo:keep-with-next="always"/><style:text-properties style:font-name=" ----^ Document.odt/styles.xml[2,5662]: Error: unexpected attribute "loext:contextual-spacing"
spacing="false" fo:line-height="120%"/></style:style><style:style style:name="L ----^ Document.odt/styles.xml[2,6331]: Error: unexpected attribute "loext:contextual-spacing"
er-lines="false" text:line-number="0"/><style:text-properties style:font-name=" ----^ Document.odt/styles.xml: Info: 3 errors, no warnings
Document.odt/content.xml[2,10132]: Error: unexpected attribute "officeooo:paragraph-rsid"
old" style:font-weight-complex="bold"/></style:style><style:style style:name="P ----^ Document.odt/content.xml[2,10467]: Error: unexpected attribute "officeooo:paragraph-rsid"
old" style:font-weight-complex="bold"/></style:style><style:style style:name="P ----^ Document.odt/content.xml[2,10828]: Error: unexpected attribute "officeooo:rsid"
old" style:font-weight-complex="bold"/></style:style><style:style style:name="P ----^ Document.odt/content.xml[2,11189]: Error: unexpected attribute "officeooo:rsid"
old" style:font-weight-complex="bold"/></style:style><style:style style:name="P ----^ Document.odt/content.xml[2,11550]: Error: unexpected attribute "officeooo:rsid"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,185878]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame><text:soft-page-break/></te ----^ Document.odt/content.xml[2,186299]: Error: unexpected attribute "loext:mime-type"
="onLoad" loext:mime-type="image/png"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,186698]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxxxxxxxxxxxxxxxxxx</text: ----^ Document.odt/content.xml[2,187083]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,187450]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,187877]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><table:table table ----^ Document.odt/content.xml[2,188476]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxxxxxx</text:p></table:ta ----^ Document.odt/content.xml[2,188944]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p></table:table-cell ----^ Document.odt/content.xml[2,189562]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p></table:table-cell ----^ Document.odt/content.xml[2,190022]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p></table:table-cell ----^ Document.odt/content.xml[2,191008]: Error: unexpected attribute "loext:mime-type"
="onLoad" loext:mime-type="image/png"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,191754]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxxxx</text:p></table:tabl ----^ Document.odt/content.xml[2,192220]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,192728]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p></table:table-cell ----^ Document.odt/content.xml[2,193221]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxx</text:p></table:table- ----^ Document.odt/content.xml[2,193684]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxxxx</text:p></table:tabl ----^ Document.odt/content.xml[2,194149]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxxxxxxxxxxxxxxxxxxxxxx</t ----^ Document.odt/content.xml[2,194667]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxxxxxxxxxxxxxxxxxxxxx</te ----^ Document.odt/content.xml[2,195149]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxxxxxxxxxxxxxxxxxxxxxx</t ----^ Document.odt/content.xml[2,195632]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame>xxxxxxxxxxxxxxxxxxxxxxxxx</ ----^ Document.odt/content.xml[2,196337]: Error: unexpected attribute "loext:mime-type"
="onLoad" loext:mime-type="image/png"/></draw:frame></text:p></table:table-cell ----^ Document.odt/content.xml[2,197227]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,197626]: Error: unexpected attribute "loext:mime-type"
="onLoad" loext:mime-type="image/png"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,198108]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,198475]: Error: unexpected attribute "loext:mime-type"
="onLoad" loext:mime-type="image/png"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,198920]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,199287]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml[2,199748]: Error: unexpected attribute "loext:mime-type"
"onLoad" loext:mime-type="image/jpeg"/></draw:frame></text:p><text:p text:style ----^ Document.odt/content.xml: Info: 366 errors, no warnings
internal:/schema/odf1.2/OpenDocument-v1.2-os-dsig-schema.rng: Info: parsed.
Document.odt: Info: 369 errors, no warnings


I have no idea why the documents are showing up as non-conformant ODFs as I only work in Libreoffice to try and keep things as standard as possible and indeed this file was first created from within the same program.




Version: 6.3.6.2
Build ID: 6.3.6-1
CPU threads: 4; OS: Linux 5.6; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded
Comment 12 Buovjaga 2020-05-06 15:08:08 UTC
Notice the "loext" - these are extensions to the 1.2 standard. I assume they are included in the 1.3 standard, which was recently published https://www.oasis-open.org/news/announcements/open-document-format-for-office-applications-opendocument-v1-3-from-the-opendocum
Comment 13 1000dead 2020-05-08 14:21:42 UTC
OK, good that sheds a bit of light on things. I created 2 fresh single page documents, virtually nothing in them just the word test written on the page and uploaded both to the validator.


The first file is saved with the recommended settings that Libreoffice comes with:    * 1.2 Extended (recommended) *

Result for Test.odt
The document is NOT conformant ODF1.2!

Details:
Test.odt: Info: ODF version of root document: 1.2
internal:/schema/odf1.2/OpenDocument-v1.2-os-manifest-schema.rng: Info: parsed.
Test.odt/META-INF/manifest.xml: Info: no errors, no warnings
Test.odt/mimetype: Info: no errors, no warnings
Test.odt: Info: Media Type: application/vnd.oasis.opendocument.text
internal:/schema/odf1.2/OpenDocument-v1.2-os-schema.rng: Info: parsed.
Test.odt/meta.xml: Info: Generator: LibreOffice/6.3.6.2$Linux_X86_64 LibreOffice_project/30$Build-2
Test.odt/meta.xml: Info: no errors, no warnings
Test.odt/settings.xml: Info: no errors, no warnings
Test.odt/styles.xml[2,4843]: Error: unexpected attribute "loext:contextual-spacing"
ng="false" fo:keep-with-next="always"/><style:text-properties style:font-name=" ----^ Test.odt/styles.xml[2,5618]: Error: unexpected attribute "loext:contextual-spacing"
spacing="false" fo:line-height="115%"/></style:style><style:style style:name="L ----^ Test.odt/styles.xml[2,6307]: Error: unexpected attribute "loext:contextual-spacing"
er-lines="false" text:line-number="0"/><style:text-properties style:font-name=" ----^ Test.odt/styles.xml: Info: 3 errors, no warnings
Test.odt/content.xml[2,2778]: Error: unexpected attribute "officeooo:rsid"
" officeooo:paragraph-rsid="001279d6"/></style:style></office:automatic-styles> ----^ Test.odt/content.xml: Info: 1 errors, no warnings
internal:/schema/odf1.2/OpenDocument-v1.2-os-dsig-schema.rng: Info: parsed.
Test.odt: Info: 4 errors, no warnings







The second file, I went into options and changed how the Libreoffice saves files to just plain:    * 1.2 *


Result for Test 2.odt
The document is conformant ODF1.2!

Details:
Test 2.odt: Info: ODF version of root document: 1.2
internal:/schema/odf1.2/OpenDocument-v1.2-os-manifest-schema.rng: Info: parsed.
Test 2.odt/META-INF/manifest.xml: Info: no errors, no warnings
Test 2.odt/mimetype: Info: no errors, no warnings
Test 2.odt: Info: Media Type: application/vnd.oasis.opendocument.text
internal:/schema/odf1.2/OpenDocument-v1.2-os-schema.rng: Info: parsed.
Test 2.odt/meta.xml: Info: Generator: LibreOffice/6.3.6.2$Linux_X86_64 LibreOffice_project/30$Build-2
Test 2.odt/meta.xml: Info: no errors, no warnings
Test 2.odt/settings.xml: Info: no errors, no warnings
Test 2.odt/styles.xml: Info: no errors, no warnings
Test 2.odt/content.xml: Info: no errors, no warnings
internal:/schema/odf1.2/OpenDocument-v1.2-os-dsig-schema.rng: Info: parsed.
Test 2.odt: Info: no errors, no warnings



...so I guess, by default Libreoffice is not sticking to specs on default settings? The online validator is not picking up on 1.3 specs? Both combined? :) Would this account for the page blanks appearing? Thanks Buovjaga!





Version: 6.3.6.2
Build ID: 6.3.6-1
CPU threads: 4; OS: Linux 5.6; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded
Comment 14 1000dead 2020-10-11 21:15:03 UTC Comment hidden (obsolete)
Comment 15 1000dead 2021-02-05 16:50:24 UTC
Created attachment 169503 [details]
erratic page count

After updating to version 7, blank pages are still being randomly inserted anywhere from a few to hundreds, also page count(refer to attached image)is erratic



Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
7.0.4-1
Calc: threaded

Thanks
Comment 16 Timur 2022-01-24 12:09:40 UTC
(In reply to Timur from comment #9)
> First attachment 123613 [details] page count increased from 15 to 21, than
> to 19, than with 6.2.8. to 17 and now with 7.0+ to 18 (undo gives 16).

attachment 123613 [details] in LO 7.4+ briefly show 16 but really settles at 15 pages. Blank page insert at page 2 shows 16 pages so that would be correct. 
So that would be WFM for original report. 
Only, Undo removes blank page but remains at 16 pages. Explained in Comment 10. But there are so many undo bugs that it may be already reported. 
Anyway, that's seems like a layout issue that will surely not be resolved in this report that lost it's focus. 
So I close as WFM.
 
> Attachment 154009 [details] is not sure to be the same bug, doesn't have
> steps to reproduce.
This one is larger document with many images. It opens 198 pages and Ctrl+Enter increases to 199. Doesn't seem like this bug. 1000deadm you need to write exact steps that make this document increase a number of pages and report like a separate bug. No need to upload again, just write Attachment 154009 [details].