Description: Some text is missing when converted attached docx file to pdf. It looks like that, the text is missing but when we click on it scrolling option appears and the text avaiable on the next line. Steps to Reproduce: 1.Open the attached "Pxxx Survey Strategy_OpenTextScrubbed.docx" file in libre office. 2.Export the file to pdf. 3.Open the PDF and observe that, the text "Strategy" is missing. 4.All looks fine when the same docx file is converted to PDF using ms office. Actual Results: The text is missing in the converted pdf. Expected Results: Libre office converted pdf should be same as pdf converted from MS office. Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.5.2 (X86_64) / LibreOffice Community Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59 CPU threads: 12; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: threaded
Created attachment 195248 [details] Source file
Created attachment 195249 [details] pdf converted from Libre office
Created attachment 195250 [details] pdf converted from MS office
Created attachment 195251 [details] MSO_vs_LO
LibreOffice allows to export fields as PDF forms, and the content controls were added recently [1]. In that mode (the default), Adobe Reader uses a bit different font, so the content doesn't fit to the box exactly, and splits into two lines, and the second of them is available by scrolling. Note, that e.g. Google Chrome's built-in PDF reader shows it correctly. It is incorrect to compare the PDFs created as forms, to what Word generates (which is plain PDF). If you unselect PDF forms in Writer's PDF export, the PDF will be the same, without the problem. It is unclear, if the export could be improved. Also, it seems that the first content control should include the first character, too? [1] https://vmiklos.hu/blog/sw-content-controls4.html
> In that mode (the default) I wonder if it's a good default to create PDF forms, instead of producing perfect output when you can't have both at the same time. I assume this bug would be fixed if we would default to not creating PDF forms from content control/form control?
(In reply to Miklos Vajna from comment #6) > I assume this bug would be fixed if we would default to not creating PDF > forms from content control/form control? That would be a reasonable change IMO. It would make the default export matching expectations, and would almost fix this. Except the questions in comment 5. Especially about the first character being outside of the control.
Is there a way to disable the "Create PDF form" option when exporting to PDF using --headless --convert-to pdf (without GUI) ?
(In reply to SATYA SRINIVAS K from comment #8) https://help.libreoffice.org/latest/en-US/text/shared/guide/pdf_params.html?&DbPAR=SHARED
(In reply to SATYA SRINIVAS K from comment #8) > Is there a way to disable the "Create PDF form" option when exporting to PDF Comment 9 indicates that there is a configuration option to handle this, but it is not something that can be specified at the command line. It is part of the user profile. So, it could be set via an extension for example. The sample configuration extension does exactly that - disables creating PDF forms (along with various other useful changes) https://wiki.documentfoundation.org/File:Sample_LO_configuration_extension.oxt I made a patch to turn off "create PDF form" by default since the PDFs we create that contain content controls are actually really poor. https://gerrit.libreoffice.org/c/core/+/152622 However, I do not fell comfortable having my name associated with this change. There seem to be some internal PDF structures that depend on forms being enabled in order for some unit tests to pass. They don't really seem to be involved in export in the normal process. However, I don't like being required to have some parts of LO default to true and other parts default to false. So I will abandon that patch and leave it to PDF people to pick it up if they want it.
(In reply to Mike Kaganski from comment #7) > Except the questions in comment 5. Especially about the first character > being outside of the control. That is bug 158661
Created attachment 195586 [details] Minimal reproducer Attaching an other small reproducer: content control has rich text -- unless ExportFormFields is turned off, the "bbb" text will turn into plain text in the PDF case.
https://gerrit.libreoffice.org/c/core/+/171226 fixes this on master, just I mistyped the bug number, sorry about that.
(In reply to Miklos Vajna from comment #13) > https://gerrit.libreoffice.org/c/core/+/171226 fixes this on master, just I > mistyped the bug number, sorry about that. Can you backport this fix to 24.2.6. ?
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/b8acf1f2a08c3be2948281e39ec9fdccd5111870 tdf#162009 PDF export: disable export of form fields as PDF forms by default It will be available in 24.8.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to SATYA SRINIVAS K from comment #14) > Can you backport this fix to 24.2.6. ? Already proposed at https://gerrit.libreoffice.org/c/core/+/171335, thanks to Xisco.
(In reply to Miklos Vajna from comment #16) > (In reply to SATYA SRINIVAS K from comment #14) > > Can you backport this fix to 24.2.6. ? > > Already proposed at https://gerrit.libreoffice.org/c/core/+/171335, thanks > to Xisco. Thank you Miklos and Xisco.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/81c883cf116bd8cd6e0901f5813c20783fa6051e tdf#162009 PDF export: disable export of form fields as PDF forms by default It will be available in 24.2.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-24-8-0": https://git.libreoffice.org/core/commit/bff2b51403707ab9a4e98b861bea0099ed87b08c tdf#162009 PDF export: disable export of form fields as PDF forms by default It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.