Skip to content

The bug in the field rendering logic, refs #463

Georgiy Sgibnev requested to merge georgiy/poppler:cyrillic-field into master

Use case: we have the field with the cyrillic text, but without an AP.

<<
    /Type /Annot
    /Subtype /Widget
    /F 4
    /Rect [165.7 453.7 315.7 467.9 ]
    /FT /Tx
    /P 1 0 R
    /T (Given Name Text Box)
    /TU (...)
    /V (...)
    /MaxLen 40
    /DR <</Font <</Font3 67 0 R >> >>
    /DA (0.00000 0.00000 0.00000 rg\n/Font3 11.00 Tf\n)
>>

67 0 R is the embedded CID font. AcroForm knows nothing about it.

Acrobat Reader works as expected:

acrobat_form

Firefox and Chrome too.

Okular shows nothing:

okular_form

From the PDF spec:

  1. TABLE 8.47 (about an AcroForm):

    DR A document-wide default value for the DR attribute of variable text fields.

  2. TABLE 8.51 (additional entries common to all fields containing variable text):

    DR (Required; inheritable) A resource dictionary containing default resources ... to be used by the appearance stream.

My interpretation is:

  1. Use a field's resource dictionary.
  2. If there is no such a thing, then use an AcroForm's resource dictionary.

Okular with the fixed Poppler:

okular_form_ok

form_modified.pdf

Edited by Georgiy Sgibnev

Merge request reports