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)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:rtf, preBibisect, regression
Depends on:
Blocks: RTF-New-Import RTF-External
  Show dependency treegraph
 
Reported: 2019-04-18 15:14 UTC by Andrés Maldonado
Modified: 2025-04-08 15:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


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

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
Description:
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:

actual_results.png:
https://framapic.org/7umsw3Hy4WtJ/MMXsulECEAQV.png

expected_results.png:
https://framapic.org/ue4F1lkCD7HM/9TSWBd5K2s0X.png
Comment 4 Roman Kuznetsov 2019-05-12 20:45:35 UTC
repro in

Version: 6.3.0.0.alpha0+
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 3.4.0.1, but the tables are completely gone in 3.5.0.3. The tables come back in 4.1.0.4, without the break this time.

The bug is already in oldest of bibisect-43all, so that can't be bibisected.
Comment 6 QA Administrators 2023-02-12 03:20:58 UTC Comment hidden (obsolete)
Comment 7 Gabor Kelemen (allotropia) 2025-04-08 15:11:33 UTC
Still no page break in:

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 22ef238e820955f6f8ac84781289b8a1d8e477b9
CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

also the blue highlight is still missing.
The bottom tables border width is reported as 1.5 pt in Word 2010, and opens as 1.35 pt in Writer, so actually a bit less - nevertheless incorrect.