Created attachment 183823 [details] PDF output from LO 7.5 dev master Description: When exporting/printing a file containing content control fields, horizontal position for RTL fields is wrong, and overlaps text. Steps to Reproduce: 1. Open attachment 182846 [details]. 2. Open "File" > "Export as" > "Export as PDF" menu option 3. In "General" tab, column 2, check "Create PDF form", and set "Submit Format" to "FDF". 4. Click "Export" to export the document to PDF. 5. Open the exported file either in "Adobe Acrobat" or "Mozilla Firefox" to see the exported fields. Or, simply open the PDF attachment in Acrobat or Firefox. Actual Results: The RTL fields from page 1 are incorrectly place horizontally and overlap other parts of text. On the other hand, LTR fields from the last page are placed correctly. Expected Results: The fields in PDF file should be placed in the position that were in the source file. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 6bf5dd8faea420aa0dbc7c429952c9868bcadb9e CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
@Miklos: I would like to fix this issue. Could you please give me some advise/code pointers? I see boundary calculations inside SwContentControlPortion::DescribePDFControl in sw/source/core/text/itrform2.cxx.
Created attachment 183842 [details] Wrong hotizontal position of the fields visible in the PDF file opened in Firefox This is a screenshot of the bad positioning of the fields in the PDF file, visible when opened in Firefox. It is worth mentioning that even the positions of the fields in the last line that seem to be OK are wrong. That is because the place of month / year is reversed, suggesting that the calculation of the positions should be somehow reversed for RTL.
Yes, all content-control-specific PDF export code is in SwContentControlPortion::DescribePDFControl(), you found the correct place already. :-) Thanks for looking into this!
Hossein committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1466e2a58f40c869d8c2590a4479e85c093b3468 tdf#152246 Fix RTL content control field position It will be available in 7.6.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.
Hossein committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/57f46a5a64f4e3bca2f0a52309ca7d201c1e2372 tdf#152246 Test position of RTL elements in PDF It will be available in 7.6.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.
Hossein committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/df461b42126e440492fc919d2b1b2d6649962a90 tdf#152246 Fix RTL content control field position It will be available in 7.5.4. 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.