Bug 104114 - Textbox form fields show as Password fields when exported in PDF forms
Summary: Textbox form fields show as Password fields when exported in PDF forms
Status: RESOLVED DUPLICATE of bug 50879
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.2.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-22 14:33 UTC by E. Gaudrain
Modified: 2016-11-24 10:52 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
ODT test case (9.36 KB, application/vnd.oasis.opendocument.text)
2016-11-22 14:37 UTC, E. Gaudrain
Details
Filled PDF test case (19.41 KB, application/pdf)
2016-11-22 14:37 UTC, E. Gaudrain
Details
Screenshot of display in Acrobat Reader DC (358.04 KB, image/png)
2016-11-22 14:39 UTC, E. Gaudrain
Details
Screenshot of display in Preview (185.53 KB, image/png)
2016-11-22 14:40 UTC, E. Gaudrain
Details
Screenshot with Adobe Reader DC (18.70 KB, image/png)
2016-11-24 08:30 UTC, Alex Thurgood
Details
New ODT test case with system font (9.82 KB, application/vnd.oasis.opendocument.text)
2016-11-24 09:11 UTC, E. Gaudrain
Details
New filled PDF test case with system font (22.19 KB, application/pdf)
2016-11-24 09:12 UTC, E. Gaudrain
Details
Screenshot for new filled PDF with system font (57.84 KB, image/png)
2016-11-24 09:14 UTC, E. Gaudrain
Details
Font tab from Document properties window in Acrobat Reader. (233.63 KB, image/png)
2016-11-24 09:22 UTC, E. Gaudrain
Details
Font tab from Reader's Document properties after moving font from LO to system (235.37 KB, image/png)
2016-11-24 09:37 UTC, E. Gaudrain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description E. Gaudrain 2016-11-22 14:33:04 UTC
Description:
When a Text Box form field is inserted, it behaves as expected in LibreOffice, but when the document is exported in PDF, the Text Box behaves like a password field, filling with the masking character if opened in Adobe Acrobat Reader DC.

Setting the control's font to "sans" solves the issue, but it means specific fonts cannot be used for Textboxes.

Steps to Reproduce:
1. Create a new document
2. Show the Form Controls toolbar.
3. Insert a Text Box control.
4. Export to PDF.
5. Open the PDF in Adobe Acrobat DC.

Actual Results:  
The generated PDF contains a Textbox field, but when the content is edited, it only shows password masking characters (expect spaces).

If opened with Preview, the textbox behaves as expected.

Expected Results:
The Textbox in the generated PDF should display correctly in Acrobat Reader DC, with the selected font.


Reproducible: Always

User Profile Reset: No

Additional Info:
The problem seems to be related to font definitions. If the Font property of the Textbox control is set to "sans" instead of "Liberation Sans", the field behaves as expected once exported.




User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
Comment 1 E. Gaudrain 2016-11-22 14:37:31 UTC
Created attachment 128945 [details]
ODT test case
Comment 2 E. Gaudrain 2016-11-22 14:37:55 UTC
Created attachment 128946 [details]
Filled PDF test case
Comment 3 E. Gaudrain 2016-11-22 14:39:16 UTC
Created attachment 128947 [details]
Screenshot of display in Acrobat Reader DC
Comment 4 E. Gaudrain 2016-11-22 14:40:19 UTC
Created attachment 128948 [details]
Screenshot of display in Preview
Comment 5 E. Gaudrain 2016-11-22 14:53:22 UTC
Now Acrobat is complaining:

Cannot find or create the font 'LiberationSans'. Some characters may not display or print correctly.

While checking it seems that Liberation Sans is not installed as a System or User font but stays only in LO's installation directory. So Acrobat cannot find it.

I am guessing that for the rest of the text, the font is included in the document, but that partial font sets cannot be used for forms.
Comment 6 E. Gaudrain 2016-11-22 14:58:25 UTC
Some internet searches confirm that if a font is used in a form, it should be fully embedded:
https://answers.acrobatusers.com/Embed-standard-font-PDF-form-field-q5016.aspx
https://answers.acrobatusers.com/embed-fonts-in-a-form-q302105.aspx

A simple workaround to avoid the issue from popping up would be to default form fonts to a base font (rather than Liberation).

A real fix would mean embedding fonts specified in Textbox fully to allow Acrobat to find it.
Comment 7 Alex Thurgood 2016-11-24 08:27:37 UTC
No repro for me with 

Adobe Reader DC
Architecture: x86_64
Build: 15.20.20039.203716
AGM: 4.30.66
CoolType: 5.14.5
JP2K: 1.2.2.37137

and LibreOffice :
Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
Threads CPU : 2; Version de l'OS :Mac OS X 10.12.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

using your test file ODT document as the starting point.

When exporting to PDF, I chose FDF as the format, as you didn't mention in your report which selection from the dropdown list you had made.

So, either I'm doing something wrong, or else there is missing information, either way, setting to NEEDINFO
Comment 8 Alex Thurgood 2016-11-24 08:30:31 UTC
Created attachment 128980 [details]
Screenshot with Adobe Reader DC

This is a screenshot taken when opening the PDF exported from ODT and filling in the textfields
Comment 9 E. Gaudrain 2016-11-24 09:00:25 UTC
I had used "PDF". I now tried with "FPDF" instead, but the problem persists for me.

Note that meanwhile I also updated from 5.2.2.2 to 5.2.3.3 (somehow the update wasn't available through the LibreOffice interface, so did it manually). My current version is now:

Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
CPU Threads: 4; OS Version: Mac OS X 10.11.6; UI Render: default; 
Locale: en-US (en.UTF-8); Calc: group

Also didn't solve the issue.

My Acrobat Reader DC version is 2015.020.20042 (the latest). Your version seems to be the previous iteration. I couldn't figure out how to get detailed version information like you displayed.

The only differences I see is that I am still on the previous version of OSX, but I have a newer Acrobat Reader. I am also wondering if Liberation Sans is installed as a system or user font on your machine?
Comment 10 E. Gaudrain 2016-11-24 09:11:53 UTC
Created attachment 128982 [details]
New ODT test case with system font

I added another text field with font Baskerville, which is installed on my system.
Comment 11 E. Gaudrain 2016-11-24 09:12:55 UTC
Created attachment 128983 [details]
New filled PDF test case with system font
Comment 12 E. Gaudrain 2016-11-24 09:14:51 UTC
Created attachment 128984 [details]
Screenshot for new filled PDF with system font
Comment 13 E. Gaudrain 2016-11-24 09:22:00 UTC
Created attachment 128985 [details]
Font tab from Document properties window in Acrobat Reader.

There is indeed something weird with "Liberation Sans": the Actual Font field is set to "unknown".

The problem is the same if I use any LibreOffice font that is not present as a system font (DejaVu, other Liberation variants...).
Comment 14 E. Gaudrain 2016-11-24 09:37:59 UTC
Created attachment 128986 [details]
Font tab from Reader's Document properties after moving font from LO to system

Tried to install Liberation Sans as a user font. First attempt didn't work, but when I removed the font from /Applications/LibreOffice.app/Contents/Resources/fonts/truetype it did work.

So with Liberation Sans as a system font, and *not* in LO's font folder, I can create a TextBox with that font. The font is also properly listed as embedded in the created PDF file.

So it looks like, in my version, there is a problem with how LO's fonts are (fully) embedded when a subset is not used. I don't know however whether this is restricted to forms or if this applies to all cases where a LO font would be fully embedded.
Comment 15 E. Gaudrain 2016-11-24 09:57:13 UTC
Running pdffonts on the test case pdf I see:

name                       type         encoding     emb sub uni object ID
-------------------------- ------------ ------------ --- --- --- ---------
BAAAAA+LiberationSerif     TrueType     WinAnsi      yes yes yes     13  0
LiberationSans             TrueType     WinAnsi      no  no  no      19  0
ArialMT                    TrueType     WinAnsi      no  no  no      17  0
Baskerville-Bold           TrueType     WinAnsi      no  no  no      15  0


So LiberationSans, Baskerville-Bold are actually not embedded.
Comment 16 E. Gaudrain 2016-11-24 10:04:08 UTC
Looks like a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=50879.
Comment 17 Alex Thurgood 2016-11-24 10:09:46 UTC
(In reply to E. Gaudrain from comment #16)
> Looks like a duplicate of
> https://bugs.documentfoundation.org/show_bug.cgi?id=50879.

Indeed, setting as such, thanks for your input !

*** This bug has been marked as a duplicate of bug 50879 ***
Comment 18 Alex Thurgood 2016-11-24 10:24:22 UTC
As to my system, a search in macOS Font Manager doesn't reveal the presence of any Liberation fonts, either at the system level or user level, so I've no idea why it works for me.

I have the latest version of Adobe Reader DC for my platform OS/locale, as I downloaded it today from Adobe's servers - I previously didn't have Adobe Reader installed.

If I look at the fonts that the output PDF contains according to Reader, I see :

Arial, Embedded, TT, Custom codepage
Helvetica, Type1, Custom codepage, Real Font : Helvetica, Real Font Type : TT
Liberation Serif (partially embedded), TT, integrated codepage
Comment 19 E. Gaudrain 2016-11-24 10:52:30 UTC
So LiberationSans doesn't show at all in the list of fonts? Or does it show lower in the list as a normal font? Also, was it with test PDF above, or with a PDF you generated from the test ODT?

I removed my version of Acrobat Reader and reinstalled from the web, which had the effect of reverting to the previous version. But the problem persists.

Your font listing from Reader seems to be a bit different from mine. Can you run pdffonts on the PDF you generate from the ODT (if that's what you tried it with)?

I am starting to think that it is perhaps Acrobat Reader that is being picky with how fonts are named, and not bothering with finding a substitute if the font is missing on the system, but since so many people use Reader, that makes distribution difficult... I am also wondering if the generated PDF shows the same problem in other versions of Reader, on other platforms...