Bug 61850 - Exporting Text Box Multi-Line form fields from specific ODT to PDF with PDF form mis-formats in some readers like Adobe Reader
Summary: Exporting Text Box Multi-Line form fields from specific ODT to PDF with PDF f...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: low minor
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2013-03-05 12:37 UTC by Paul Simmonds
Modified: 2023-05-20 20:22 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Demo ODT document demonstrating the bug (15.37 KB, application/vnd.oasis.opendocument.text)
2013-03-05 12:40 UTC, Paul Simmonds
Details
PDF document (Export in LO4.0) (30.18 KB, application/pdf)
2013-03-05 12:42 UTC, Paul Simmonds
Details
PDF document (Export in LO4.1.2) (30.18 KB, application/pdf)
2013-10-12 06:20 UTC, tommy27
Details
Screen Cap of ODT document / form in LO (65.81 KB, image/jpeg)
2013-10-12 10:28 UTC, Paul Simmonds
Details
Screen Cap of PDF document / form in Acrobat (35.43 KB, image/jpeg)
2013-10-12 10:29 UTC, Paul Simmonds
Details
Screen Cap of PDF document / form in Foxit & Acrobat (119.98 KB, image/png)
2013-10-13 17:18 UTC, tommy27
Details
Screen Cap of PDF-1A export (thus NO 'form" enabled) (37.38 KB, image/jpeg)
2013-10-14 07:09 UTC, Paul Simmonds
Details
Demo ODT document added form fields (15.97 KB, application/3dr)
2019-01-31 09:03 UTC, Timur
Details
Screen capture (July 2022) of LO vs Acrobat (238.33 KB, image/jpeg)
2022-07-28 07:36 UTC, Paul Simmonds
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Simmonds 2013-03-05 12:37:18 UTC
Problem description:

Exporting a form to PDF does not align text in the form boxes

Steps to reproduce:
1. Create a document in LO containing a one line text box
   and a multi-line text box
2. Export to PDF
3. View in Adobe Reader

Expected behavior:

Should look like the LO version

Notes:

Does work correctly in Open Office 3.2.0 and was broken thereafter.

              
Operating System: Windows 7
Version: 4.0.0.3 release
Comment 1 Paul Simmonds 2013-03-05 12:40:55 UTC
Created attachment 75951 [details]
Demo ODT document demonstrating the bug

Export this form to PDF and try to fill in the form to see the bug
Comment 2 Paul Simmonds 2013-03-05 12:42:17 UTC
Created attachment 75952 [details]
PDF document (Export in LO4.0)

Open in Adobe Acrobat to demonstrate the problem
Comment 3 Thomas van der Meulen [retired] 2013-03-05 16:06:02 UTC
Thank you for reporthing this bug,
I can reproduce this bug running LibreOffice 4.0.1.2 on Windows 7.
Comment 4 Paul Simmonds 2013-03-07 23:46:20 UTC Comment hidden (obsolete)
Comment 5 tommy27 2013-10-12 06:20:38 UTC
Created attachment 87501 [details]
PDF document (Export in LO4.1.2)

test file can correctly exported to PDF with no loss of text in LibO 4.1.2 under Win7 64bit. see attached file.
Comment 6 tommy27 2013-10-12 06:21:41 UTC
set status to RESOLVED WFM.
feel free to reopen if you still experience this bug.
Comment 7 Paul Simmonds 2013-10-12 10:28:38 UTC
Created attachment 87502 [details]
Screen Cap of ODT document / form in LO
Comment 8 Paul Simmonds 2013-10-12 10:29:27 UTC
Created attachment 87503 [details]
Screen Cap of PDF document / form in Acrobat
Comment 9 Paul Simmonds 2013-10-12 10:32:39 UTC
Test document tried in latest LO (4.1.2.3 on Windows 7)

this problem is *** NOT *** fixed.

See the two screen captures;

One from LO 4.1.2.3 with the test document, clearly showing correctly aligned text and three lines showing in the large text entry box.

Then see the Adobe Acrobat screen capture where the single line is not aligned correctly, and there is only one line showing in the big text box.
Comment 10 tommy27 2013-10-12 15:12:39 UTC
did you see my attached PDF? it looks the same as the source .ODT I do not see the differences of your screenshots.
Comment 11 Paul Simmonds 2013-10-12 15:41:28 UTC
This is a problem with the Form Fields.

Look at the two screen captures,

On Open Office you can see one correct line in the top form field, and three lines in the large form field

On the export to PDF then the top form field is corrupted with the top half of the characters truncated and in the large form field only one line shows.

Basically, something in the export appears to be adding space before or after the paragraph when exporting to PDF.

I currently have to maintain an old copy of OpenOffice 3.2.0 so I can PDF my fillable forms - this was the last version it appeared to work correctly in.
Comment 12 tommy27 2013-10-12 18:47:11 UTC
please answer my question: did you see my PDF attachment here?
https://bugs.freedesktop.org/attachment.cgi?id=87501

I see no corruption in my PDF output unlike your screenshots.
and I used your same test file on 4.1.2, so it looks fixed in that release.

did you try upgrade to 4.1.2 or are you still using 4.0?
Comment 13 Paul Simmonds 2013-10-13 13:04:43 UTC
Yes, your PDF file shows exactly the same corruption as the test one I generated, and looks the same as the screen-shot I generated.

I am viewing it in Adobe Acrobat 11.0.5 (latest) on Windows 7 x64, fully patched an up to date.

However; In my original testing the bug did not occur with some third-party PDF readers.

If I go back to OO 3.2.0, open the same test file, and export a PDF from OO 3.2.0, and then read it exactly the same Acrobat reader it formats correctly.

Thus the conclusion is that something in LO (and OO after 3.2.0) changed, breaking the formatting under Acrobat.
Comment 14 tommy27 2013-10-13 17:18:41 UTC
Created attachment 87564 [details]
Screen Cap of PDF document / form in Foxit & Acrobat

@Paul
I think it's a matter of PDF reader.
Here's my screenshot showing normal appearance on PDF output in Foxit Reader 5.4 and Adobe Acrobat 7.1

I don't have Acrobat 11 to test though.
Comment 15 tommy27 2013-10-13 17:21:07 UTC
the 4.0 PDF output however looks corrupted even in my PC.
but as I said the 4.1 PDF output looks good.

did you try upgrading to 4.1.2 or are you still using 4.0 to generate those PDFs?
Comment 16 ign_christian 2013-10-14 03:35:05 UTC
I can confirm similar problem with PDF Xchange Viewer 2.5 (only show 1 top line) & Google Chrome 28 (showing 2 & a half lines of the texts).

Those test created using 'Create PDF Form' with any 'Submit format' options (same result).
Problem gone if "PDF/A-1a" enabled.

LO 4.0.6.1 (Win7 32bit)
Comment 17 tommy27 2013-10-14 05:18:14 UTC
set status to NEW according to previous comment.

however I still see no corruption in Acrobat 7.1 in none of the PDF-save variants ("PDF/A-1a" enabled or disabled).

I still suspect this is one of those bugs which shows up only in certain readers
Comment 18 Paul Simmonds 2013-10-14 07:09:04 UTC
Created attachment 87579 [details]
Screen Cap of PDF-1A export (thus NO 'form" enabled)

Adobe Acrobat 11.0.5 screen cap showing text correctly formatted if you export from LO using the PDF-1A option - however this disables "forms" for these are not fillable fields.
Comment 19 Paul Simmonds 2013-10-14 07:12:02 UTC
I would agree this is an "edge" case where it depends on the reader - however the majority use by Joe Public will be the Adobe Acrobat reader under Windows, so working on the latest version of AA (currently 11.0.5) must be the definitive test case!
Comment 20 Paul Simmonds 2013-10-14 07:15:11 UTC
Since this worked fine in OpenOffice 3.2 and was broken thereafter, is it not possible to backtrack on the change logs between 3.2 and what came after to find out what was "fixed" (by fixed I'm assuming that fixing of enhancing something broke forms export unintentionally) and thus which code was changed??

BTW - I don't code - so apologies if this is "teaching people to suck eggs".
Comment 21 ign_christian 2013-10-14 07:27:47 UTC
Hi Paul, sorry I forgot that's all about form so using PDF/A-1a isn't a workaround. Perhaps the only workaround at the moment is using 3rd party PDF printer such as PDFcreator, etc.

Tommy has marked this bug NEW so it's confirmed as a bug. Then someone with such expertise will track this problem with latest Adobe Acrobat 11.0.5.
Comment 22 QA Administrators 2015-04-01 14:40:27 UTC Comment hidden (obsolete)
Comment 23 Buovjaga 2015-04-27 09:32:07 UTC
Reproduced with attachment 75951 [details]

Win 8.1 32-bit
Adobe reader XI
LibO Version: 5.0.0.0.alpha1+
Build ID: f0edb677f09ad338e22ac3b5d91497b4479e0b3c
TinderBox: Win-x86@39, Branch:master, Time: 2015-04-27_00:34:58
Locale: fi_FI
Comment 24 QA Administrators 2016-09-20 09:32:43 UTC Comment hidden (obsolete)
Comment 25 Paul Simmonds 2016-09-20 13:34:47 UTC
I have verified that this bug still exists.

Version: 5.1.5.2 (x64)
Build ID: 7a864d8825610a8c07cfc3bc01dd4fce6a9447e5
CPU Threads: 6; OS Version: Windows 6.19; UI Render: GL; 
Locale: en-GB (en_GB); Calc: group

Please can you prioritize for a fix - the ability to export PDF fillable forms is a real plus over MS-Word. [If only it worked] I currently have to keep an un-patched copy of OpenOffice 3.2.0 on my computer just to produce these forms.
Comment 26 Nicolas R 2017-01-18 18:00:15 UTC
Version: 5.2.4.2
Build ID: 3d5603e1122f0f102b62521720ab13a38a4e0eb0
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; 
Locale: fr-FR (fr_FR); Calc: group

Bug still here.

Problem only with the option "Text type" sets to "Multi-line" in text box properties.

It's visually ok in LibO odt doc but there is a kind of "upper margin" in the exported pdf forms ( Pdf Xviewer or Acrobat Reader) so you have to oversize your control if you want to see the whole text in pdf-reader.

This " upper margin" isn't here  with "Text type" sets to "Single-line"
Comment 27 Nicolas R 2017-01-19 10:59:26 UTC
Correction to my previous comment :
 With "Text type" sets to "Single-line", there is also margin / padding problem with Adobe Acrobat Reader, the upper third of text is hidden (default text and / or text entered with Acrobat Reader).

All is ok with LibreOffice odt or pdf in PdfXviewer  but for Acrobat you must oversize slightly the form area to see the whole text.
Comment 28 Paul Simmonds 2017-01-19 19:15:35 UTC
Just to re-iterate (this is not a criticism on your comment) the standard by which a PDF export should be measured is Adobe Reader as this is what 95% of people will use.
Comment 29 himajin100000 2017-10-30 03:14:24 UTC
confirming on PDF X-Change
not sure, but can this be a possible cause?

https://opengrok.libreoffice.org/xref/core/vcl/source/gdi/pdfwriter_impl.cxx?r=11d2f3d6#4236
Comment 30 QA Administrators 2018-10-31 03:53:12 UTC Comment hidden (obsolete)
Comment 31 Paul Simmonds 2018-11-01 21:24:21 UTC Comment hidden (obsolete)
Comment 32 Paul Simmonds 2018-11-01 21:25:05 UTC Comment hidden (obsolete)
Comment 33 sophiarose 2019-01-31 05:37:31 UTC Comment hidden (spam)
Comment 34 Timur 2019-01-31 09:03:51 UTC
Created attachment 148791 [details]
Demo ODT document added form fields

I still repro in 6.3+ issue with attached ODS that's inherited from OO 3.3.
But if I add form fields myself, I don't. I see a different issue about form size, similar to comment 26. 
I added multi-line field and separated with Enters and I added multi-line field with formatting and copied from original field.
So question here is how was original ODF multi-line form field created and how was text separated to lines? 
Until then, I added "specific ODS" to the title.
Comment 35 QA Administrators 2022-07-28 03:39:28 UTC Comment hidden (obsolete)
Comment 36 Paul Simmonds 2022-07-28 07:34:52 UTC
July 2022 Bug is still present in latest version
Shortly to celebrate it's 10 year anniversary of being reported.

See July-2022 screen capture of LO doc vs Acrobat output

Version: 7.3.5.2 (x64) / LibreOffice Community
Build ID: 184fe81b8c8c30d8b5082578aee2fed2ea847c01
CPU threads: 16; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: CL
Comment 37 Paul Simmonds 2022-07-28 07:36:11 UTC
Created attachment 181468 [details]
Screen capture (July 2022) of LO vs Acrobat
Comment 38 Timur 2022-07-28 10:27:45 UTC
There were changes and improvements over time, just line 1/3 was shown before but current stats is that lines 2,5/3 are displayed. 
It all depends on PDF reader and OS and used font, but in majority of readers is like in Adobe. In Master PDF editor it's OK in Linux but NOK in Windows. But in Xreader, Xpdf it's like in Adobe and others in Windows. 

Obvious workaround is simply to enlarge a form a little bit. 
This bug is for this ODS and not general, new form exports and opens OK. 
I set to Low/Minor.
Comment 39 Paul Simmonds 2022-07-28 10:56:46 UTC
I'm going to fundamentally disagree with this last comment;

1. the PDF form output should mirror ** exactly ** what you design on LO

2. It was fine in OpenOffice and as some point in time, post fork, LO broke it.