Bug 124824 - FILEOPEN: Error rendering page break between two tables in a RTF
Summary: FILEOPEN: Error rendering page break between two tables in a RTF
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: filter:rtf, preBibisect, regression
Depends on:
Blocks: RTF-New-Import MSO-External-Producers
  Show dependency treegraph
Reported: 2019-04-18 15:14 UTC by Andrés Maldonado
Modified: 2021-02-11 06:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:

RTF document generated from table.fo (7.03 KB, application/rtf)
2019-04-18 15:17 UTC, Andrés Maldonado
Apache FOP source for table_break_table.rtf (4.45 KB, text/x-xslfo)
2019-04-18 15:18 UTC, Andrés Maldonado
PDF exported from Word (84.32 KB, application/pdf)
2021-02-11 06:08 UTC, Aron Budea

Note You need to log in before you can comment on or make changes to this bug.
Description Andrés Maldonado 2019-04-18 15:14:47 UTC
When generating a RTF with Apache FOP, if I insert a page break between two tables, it is not rendered correctly in LibreOffice.

I will submit a patch shortly to gerrit, but I'm also opening this bug to provide a detailed description.

Steps to Reproduce:
Open table_break_table.rtf with LibreOffice Writer

Actual Results:
The two tables appear on the same page. See actual_results.png

Expected Results:
There is a page break between the two tables. See expected_results.png

Reproducible: Always

User Profile Reset: No

OpenGL enabled: Yes

Additional Info:
This problem was reported by a Linagora client in 2014. A patch was made back then, but was not proposed upstream, I don't know why. The developer who made the patch does not longer work for Linagora.

The client used Apache FOP to generate a document. We have access to his .rtf, but not to the .fo source. 

The original developer mentioned in our internal ticket system that the problem is related to a page break between two tables, so I picked a template from Apache FOP (examples/fo/basic/table.fo) and inserted the page break with  `<fo:block break-before="page"></fo:block>`. The complete source is attached (table.fo) and the generated document is table_break_table.rtf. I generated it with latest Apache FOP version (2.3).

I don't know if this is the correct way of inserting a page break or if it's the same as the client's.

I can reproduce the issue with both .rtf in latest master.
Comment 1 Andrés Maldonado 2019-04-18 15:17:43 UTC
Created attachment 150856 [details]
RTF document generated from table.fo
Comment 2 Andrés Maldonado 2019-04-18 15:18:40 UTC
Created attachment 150857 [details]
Apache FOP source for table_break_table.rtf
Comment 3 Andrés Maldonado 2019-04-18 15:25:50 UTC
I cannot attach pictures due to 30000 KB size limit. Please see instead:


Comment 4 Roman Kuznetsov 2019-05-12 20:45:35 UTC
repro in

Build ID: 65f81f6acdeb03b34033a1c6515618936d5f8eca
CPU threads: 4; OS: Linux 5.0; UI render: default; VCL: kde5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-04-23_17:18:14
Locale: ru-RU (ru_RU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 Aron Budea 2021-02-11 06:08:47 UTC
Created attachment 169663 [details]
PDF exported from Word

Here's the PDF exported from Word, since the screenshots from comment 3 aren't available anymore.

I can see three problems:
- the RTF contains a Section break (Next Page) after the first table, which isn't imported, causing the reported bug,
- highlighting for the heading "How to use table elements" isn't imported,
- the border of the 2nd table is a bit thicker than in Word.

Focusing on the reported issue, the break is there in, but the tables are completely gone in The tables come back in, without the break this time.

The bug is already in oldest of bibisect-43all, so that can't be bibisected.