Description: 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 ! Actual Results: Carriage returns are not kept Expected Results: Carriage returns SHOULD be kept Reproducible: Always User Profile Reset: No Additional Info: Version: 7.3.1.3 (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 Calc: threaded
Created attachment 179052 [details] original file
Created attachment 179053 [details] result file
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: 7.5.0.0.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 Calc: threaded after: https://git.libreoffice.org/core/+/9700c1b2170ad04453a361ed5647937833ac3c18 author Miklos Vajna <vmiklos@collabora.com> Mon Jul 25 09:13:03 2022 +0200 committer Miklos Vajna <vmiklos@collabora.com> 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)