Evince uses wrong encoding when filling out a PDF form

Bug #1728077 reported by Thomas Dreibholz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evince
New
Undecided
Unassigned
Poppler
Unknown
Medium
okular
New
Undecided
Unassigned
poppler (Ubuntu)
New
Undecided
Unassigned

Bug Description

Evince uses the wrong encoding when filling out a PDF form.

How to reproduce:
- Get the official Chinese Visa Application Form from http://www.china-embassy.org/eng/visas/fd/W020130830801798289342.pdf
- Open it in Evince
- Fill in a name (e.g. "Smith"). The entered text is displayed correctly.
- Click into another filed
- The previously entered name is displayed in wrong characters (wrong encoding used?). E.g. "Smith" becomes "4NJUI".
- Saving and loading the PDF (with the entered text) also results in displaying wrong characters
- Clicking into the name filed results in displaying the correct name ("Smith")

=> It seems that somewhere in Evince (or libpoppler?) the wrong encoding is used for displaying non-active input fields.

Tested Ubuntu versions:
- Ubuntu 16.04
- Ubuntu 17.10

Tags: artful xenial
Revision history for this message
Thomas Dreibholz (dreibh) wrote :

The same problem also appears when using Okular instead of Evince. So, it is likely a problem with libpoppler.

affects: evince (Ubuntu) → poppler (Ubuntu)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Revision history for this message
In , Thomas Dreibholz (dreibh) wrote :

Evince and Okular (based on poppler) uses the wrong encoding when filling out a PDF form.

How to reproduce:
- Get the official Chinese Visa Application Form from http://www.china-embassy.org/eng/visas/fd/W020130830801798289342.pdf
- Open it in Evince
- Fill in a name (e.g. "Smith"). The entered text is displayed correctly.
- Click into another filed
- The previously entered name is displayed in wrong characters (wrong encoding used?). E.g. "Smith" becomes "4NJUI".
- Saving and loading the PDF (with the entered text) also results in displaying wrong characters
- Clicking into the name filed results in displaying the correct name ("Smith")

=> It seems that somewhere in Evince (or libpoppler?) the wrong encoding is used for displaying non-active input fields.

Tested Ubuntu versions:
- Ubuntu 16.04
- Ubuntu 17.10

Revision history for this message
Thomas Dreibholz (dreibh) wrote :
Revision history for this message
In , Thomas Dreibholz (dreibh) wrote :

Created attachment 135133
Screenshot: filling in text into a field of the form

Revision history for this message
In , Thomas Dreibholz (dreibh) wrote :

Created attachment 135134
Screenshot: filling in text into a field of the form

Revision history for this message
In , Thomas Dreibholz (dreibh) wrote :

Created attachment 135135
Screenshot: result after activating another field of the form

Revision history for this message
In , Thomas Dreibholz (dreibh) wrote :

The PDF form contains a couple of fonts -- some are embedded, some are not -- with a couple of different encodings. May be something in libpoppler goes wrong with the font encoding handling for the form's fields?

$ pdffonts W020130830801798289342.pdf
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
ZJWNJQ+SimSun CID TrueType Identity-H yes yes yes 1780 0
AASELS+TimesNewRoman,Bold CID TrueType Identity-H yes yes yes 1785 0
JEIVZQ+SimSun CID TrueType Identity-H yes yes yes 1787 0
HRUUFF+SimSun CID TrueType Identity-H yes yes yes 1789 0
TimesNewRomanPS-BoldItalicMT TrueType WinAnsi no no no 1791 0
TimesNewRomanPSMT TrueType WinAnsi no no no 1793 0
Times-Roman Type 1 Custom no no no 1689 0
AdobeSongStd-Light CID Type 0 UniGB-UTF16-H no no no 1692 0
SimHei CID TrueType UniGB-UTF16-H no no no 1693 0
SimSun CID TrueType UniGB-UTF16-H no no no 1694 0
TimesNewRoman TrueType WinAnsi no no no 1695 0
MicrosoftYaHei CID TrueType UniGB-UTF16-H no no no 1717 0
MicrosoftYaHei,Bold CID TrueType UniGB-UTF16-H no no no 1718 0
NSimSun CID TrueType UniGB-UTF16-H no no no 1719 0
AdobeSongStd-Light CID Type 0 UniGB-UTF16-H no no no 1772 0
ZJWNJQ+SimSun CID TrueType Identity-H yes yes yes 285 0
TimesNewRomanPSMT TrueType WinAnsi no no no 289 0
ZJWNJQ+SimSun CID TrueType Identity-H yes yes yes 372 0
QGJLNI+CambriaMath CID TrueType Identity-H yes yes yes 377 0
TimesNewRomanPSMT TrueType WinAnsi no no no 379 0
AdobeSongStd-Light CID Type 0 UniGB-UTF16-H no no no 361 0
TimesNewRomanPS-BoldItalicMT TrueType WinAnsi no no no 398 0
KozMinPr6N-Regular CID Type 0 UniJIS-UTF16-H no no no 410 0

Changed in poppler:
importance: Unknown → Medium
status: Unknown → Confirmed
madbiologist (me-again)
tags: added: artful xenial
Revision history for this message
In , Gitlab-migration (gitlab-migration) wrote :

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/539.

Changed in poppler:
status: Confirmed → Unknown
Revision history for this message
Thomas Dreibholz (dreibh) wrote :

The problem still exists under Ubuntu 18.04 (Bionic Beaver). Tested with Evince and Okular.

$ apt-show-versions | grep poppler | grep -v "not installed"
libpoppler-dev:amd64/bionic-security 0.62.0-2ubuntu2.1 uptodate
libpoppler-glib8:amd64/bionic-security 0.62.0-2ubuntu2.1 uptodate
libpoppler-private-dev:amd64/bionic-security 0.62.0-2ubuntu2.1 uptodate
libpoppler-qt5-1:amd64/bionic-security 0.62.0-2ubuntu2.1 uptodate
libpoppler73:amd64/bionic-security 0.62.0-2ubuntu2.1 uptodate
poppler-data:all/bionic 0.4.8-2 uptodate
poppler-utils:amd64/bionic-security 0.62.0-2ubuntu2.1 uptodate

$ apt-show-versions | grep evince | grep -v "not installed"
evince:amd64/bionic 3.28.2-1 uptodate
evince-common:all/bionic 3.28.2-1 uptodate

$ apt-show-versions | grep okular | grep -v "not installed"
libokular5core8:amd64/bionic 4:17.12.3-0ubuntu1 uptodate
okular:amd64/bionic 4:17.12.3-0ubuntu1 uptodate
okular-extra-backends:amd64/bionic 4:17.12.3-0ubuntu1 uptodate

Revision history for this message
Thomas Dreibholz (dreibh) wrote :

The problem is also reproducible under the latest development version of Ubuntu 18.10 (Cosmic) (version of August 28, 2018). It also uses libpoppler-0.62.0.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.