Bug 131386 - Hidden linebreaks are ignored on creating pdf from rtf document
Summary: Hidden linebreaks are ignored on creating pdf from rtf document
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
3.6.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:rtf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2020-03-17 12:43 UTC by Jürgen Bosch
Modified: 2020-06-19 12:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Testfile in right to left for reproduce (83.80 KB, application/msword)
2020-03-17 12:56 UTC, Jürgen Bosch
Details
Converted result with wrong linebreaks in (15.05 KB, application/pdf)
2020-03-17 12:57 UTC, Jürgen Bosch
Details
Screenshots to demonstrate the problem (154.91 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-03-17 13:29 UTC, Jürgen Bosch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Bosch 2020-03-17 12:43:31 UTC
Description:
I have an rtf document with hidden text and also with single hidden linebreaks. On using the pdf writer to convert the rtf to pdf the single hidden linebreaks are not ignored and on the pdf the linebreak is visible which is wrong.

Steps to Reproduce:
1. Use the attached testPreprocessRtl.rtf
2. Convert to pdf: soffice --headless --convert-to pdf testPreprocessRtl.rtf


Actual Results:
the hidden linebreak in rtf is contained in the result of the converted pdf document

Expected Results:
the hidden linebreak in rtf should be not contained in the converted pdf as it is in the preview of the rtf document on hide paragraph marks and the hidden formating symbols.


Reproducible: Always


User Profile Reset: No



Additional Info:
In the example file an right to left rtf is attached where the issue could be reproduced.
Comment 1 Jürgen Bosch 2020-03-17 12:56:32 UTC
Created attachment 158747 [details]
Testfile in right to left for reproduce

The rtf contains 2 lines to preview the difference display the hidden characters on the rtf.
Comment 2 Jürgen Bosch 2020-03-17 12:57:44 UTC
Created attachment 158748 [details]
Converted result with wrong linebreaks in
Comment 3 Jürgen Bosch 2020-03-17 13:04:18 UTC
Comment on attachment 158747 [details]
Testfile in right to left for reproduce

The file contains 2 Lines:

the first line has an hidden linebreak before the colon => on converting to pdf the linebreak is wrongly rendered in addition the colon is on the left side instead on the right side as in the preview of the rtf

the second line has an hidden linebreak after the colon => on converting to pdf the linebreak is wrongly rendered but the colon is correctly rendered
Comment 4 Jürgen Bosch 2020-03-17 13:10:08 UTC
My usecase is to convert rtf files to pdf.

Therefore my environment is a docker container with alpine 3.11.
In this container it is installed:
- libreoffice-writer=6.3.2.2-r3
- font-noto
- font-noto-cjk

For the convertion i use:
soffice --headless --convert-to pdf filename.rtf
Comment 5 Jürgen Bosch 2020-03-17 13:29:56 UTC
Created attachment 158751 [details]
Screenshots to demonstrate the problem
Comment 6 Buovjaga 2020-06-19 12:07:57 UTC
It already looks "bad" when opened in LibreOffice, there is no need to convert to PDF.

In which software was the RTF created in?
Comment 7 Jürgen Bosch 2020-06-19 12:44:55 UTC
The rtf is created in MS Word.
As you see in the attached document "Screenshots to demonstrat..." the rtf in MS Word looks fine but only if the hidden characters are diabled otherwise the colon is at the begin of the next line and on converting to pdf the result pdf looks bad.
Comment 8 Buovjaga 2020-06-19 12:48:01 UTC
I confirmed in

Arch Linux 64-bit
Version: 7.1.0.0.alpha0+
Build ID: ad0351b84926075297fb74abbe9b31a0455782af
CPU threads: 8; OS: Linux 5.7; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 17 June 2020