When we try to convert a docx file to PDF with headless mode, carriage returns contained in form/control fields are lost, and the text is all in one line (and no space replacing carriage return).
Please my exemple files : original docx containing text with carriage return, and the PDF result.
Steps to Reproduce:
1. convert file with command line : libreoffice --headless --convert-to pdf myfile.docx --outdir ./
2. compare docx and PDF, you'll see !
Carriage returns are not kept
Carriage returns SHOULD be kept
User Profile Reset: No
Version: 126.96.36.199 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 2; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Created attachment 179052 [details]
Created attachment 179053 [details]
I want to be more precise after some aditionnal tests.
In fact the PDF generation is ok.
The issue is that carriage return are not read correctly by libreoffice when coming from MSWord.
My file was created on word with the carriag return on the second line, and we don't see it when we open the file in libreoffice.
If i try to put a carriag return in libreoffice, the PDF is ok.
So in resume, the problem is : libreoffice does not keep/display carriage return in form field/controls when the file is created from MSWord.
Repro 7.4+. Worse with new line/enters, when text stays out in LO, so not trivial.
Seems like LO should support Rich Text Content Controls.
What is L0 ?
yes you're right, it's probably due to rich content (even if my content is not very rich...)
Created attachment 181407 [details]
The example file in current master
The line breaks are now imported and exported in:
Version: 188.8.131.52.alpha0+ / LibreOffice Community
Build ID: 7a48b95e2516f51460341c6e0f8f991cca93c6f2
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
author Miklos Vajna <email@example.com> Mon Jul 25 09:13:03 2022 +0200
committer Miklos Vajna <firstname.lastname@example.org> Mon Jul 25 09:51:22 2022 +0200
sw content controls, plain text: add DOCX import
Thanks Miklos for fixing this!
(but I'll open some new bugs for the still lost properties)