[Issue] Gap in table caused by unwanted page break?

Discuss the word processor
Post Reply
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

[Issue] Gap in table caused by unwanted page break?

Post by John_Ha »

I created a .odt document with some text and a table, and the text was such that the table was positioned with its first line at the top of the second page. All looks fine and I save the document.

When I open the saved document, the first line of the table is where expected, but the rest of that page is blank, and the remainder of the table is on the third page. Reopening the document always shows the large gap. Looking at the HTML I see a <text:soft-page-break> tag at the place at which the break occurs. Earlier in the document, the HTML says <office:text text:use-soft-page-breaks="true">. I hasten to add I am not an HTML guru.

If I now add a paragraph return in the text above the table so there is a line of text above the table, the gap disappears, and the table looks correct. Looking at the HTML, the <text:soft-page-break> tag at the place at which the break previously occured has now gone.

I also experience a similar problem when I have a Master document which calls a sub-document which is a table. The table often breaks, usually just below the first line, but sometimes below other lines, giving a large gap to the end of that page. In this case, the gaps can be removed by using Navigator to move the sub-document with the table up the document, above the previous sub-document; and then back to its correct palce. This usually cures the problem.

Is this a known problem with OOo handling of the <text:soft-page-break> tag?
Last edited by Hagar Delest on Fri Jan 28, 2011 2:49 pm, edited 1 time in total.
Reason: tagged [Solved].
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32658
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Gap in table - caused by unwanted page break?

Post by Hagar Delest »

Can you upload a sample file?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Gap in table - caused by unwanted page break?

Post by John_Ha »

Hagar
Thank you. I have attached a file test table.odt which I created specially for uploading as the original had private information.
It was created by
1 Start OOo, create a new Text document, copy about 2 pages of text from the Wright Brothers patent in a txt file, and paste it in with Ctrl/v
2 Delete the extra text leaving one page of text with one blank line below the text on page 1
3 Add the table shown using the pulldown from the table icon in the taskbar - it had no gap
4 Merge the cells in the top row of the table to form a single row. >>>>> At this stage the gap appeared
5 Save the file as test table.odt
6 Close the file
7 File > Recent documents > select test table.odt >>>> the gap appears
8 add an extra paragraph return (by typing enter) below the text to push the table one line lower. >>>>> The gap disappears.
It does it every time I open the file - I trust it will for you too.
I am running OOO320m18 Build 9502 under W7 Home Edition 64 bit.
Attachments
test table.odt
(23.64 KiB) Downloaded 237 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32658
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Gap in table - caused by unwanted page break?

Post by Hagar Delest »

I added a line and then removed it like you and once saved, it's still correct, see attachment.
test table Hagar.odt
(15.76 KiB) Downloaded 186 times
I've noticed that if you uncheck the Allow row to break across pages and columns option in the table properties, it works.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Bill
Volunteer
Posts: 8933
Joined: Sat Nov 24, 2007 6:48 am

Re: Gap in table - caused by unwanted page break?

Post by Bill »

Weird. When opened with LibO 3.3, the gap disappears when clicking in the table, but reappears when the document is closed and reloaded. In both OOo 3.3 and LibO 3.3, selecting Table > Table Properties to open the Table Format dialog, clicking the Columns tab on the dialog, then clicking OK to close the Table Format dialog without making any changes modifies the document. If the document is then saved and reloaded, no gap appears.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Gap in table - caused by unwanted page break?

Post by John_Ha »

Hagar, Bill

Thanks. It is indeed weird. Doing almost anything causes the gap to disappear. For example, the text is 11pt. If I change the size of the last line before the table to 22 pt, it spills the line to the next page and the gap disappears. However, the relevant lines in the content.xml file are identical in both cases suggesting that it is not caused by the soft page break tab.

I have been experiencing these gaps a lot in Master documents for 2 years or so. I use OOo for a magazine where each of 40 to 50 articles is a sub-document typically 1/4 to about 1 page long. I often (less than 10% of the time) get random gaps in the master. Whewn I get them, they can be made to disappear by updating the sub-document, or moving it up or down the document with Navigator. When I have the problem, it is always the same articles which give gaps, and large tables are much the worst, sometimes giving several gaps - it is quite repeatable. I had thought it was a Master problem, but seeing the problem in the table in the standalone test document convinced me it was in the table itself. Shortening an article by removing a line, or reducing the gap at the end of the paragraphs stops the gaps appearing.

I have convinced myself that it is probably because OOo is making a mistake when it calculates the length of something, and then decides it won't fit on the page so it starts at the next page, or starts the following article lower than it should be. If an article repeatedly causes the problem, creating a new, empty text document and Select All > copy > paste into the new doicument, usually stops it happening when I use the new version instead of the old. Sometimes articles just space themselves a few mm apart - ie a gap of a few mm - and updating the article removes the gap. It is not because I have large gaps below paragraphs and these are spillling out of the article - I use a macro to set all "last line in the article" to 0mm gap below paragraph.

Shall I report it as a bug?
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32658
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Gap in table - caused by unwanted page break?

Post by Hagar Delest »

Yes, I think it's worth a report with your file as attachment.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Gap in table - caused by unwanted page break?

Post by John_Ha »

Hagar
I have submitted it as a bug at http://www.openoffice.org/issues/show_bug.cgi?id=116683
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply