pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Barre <johannes.ba...@billfront.com>
Subject Weird issue with fonts in input fields after merging
Date Thu, 08 Oct 2015 11:30:35 GMT
Hello!

I have a weird issue. So, I have to PDFs. When I fill form fields in one of
them and save, everything looks fine. However, when I append this filled
PDF to another one, xpdf doesn't display the values anymore and complains
about missing fonts:

Syntax Error: Unknown font tag 'ProximaNova-Regular'
Syntax Error: Unknown font in field's DA string
Syntax Error: Unknown font tag 'ProximaNova-Regular'
Syntax Error: Unknown font in field's DA string

I'm using JRuby (9k), but I hope it's understandable for you. I put the
source & PDFs in this gist:
https://gist.github.com/iGEL/a8484f0bc44b03fa9de1 (Will delete it later,
once the issue is solved)

Other specs: pdfbox-app-1.8.10, openjdk 1.8.0_66, Debian Jessy inside of
Docker

As you can see, I use a special way to set the values. I had problems with
German umlauts using setValue and it also sometimes fails (Possibly related
to https://issues.apache.org/jira/browse/PDFBOX-1550, the message is the
same as in that bug)

The COVER_PAGE.pdf and BIW_FORM.pdf are the templates I'm using,
form_filled.pdf is just the BIW_FORM.pdf with 2 fields filled and merged is
COVER_PAGE.pdf and form_filled.pdf merged together.

The p in line 15 and 22 print out the DA value of the field and it's the
same for both files:

"/ProximaNova-Regular 9 Tf 0.019 0.305 0.627 rg" # form_filled.pdf
"/ProximaNova-Regular 9 Tf 0.019 0.305 0.627 rg" # merged.pdf

This font is according to pdffonts in both files:

$ pdffonts form_filled.pdf
name                                 type              encoding         emb
sub uni object ID
------------------------------------ ----------------- ---------------- ---
--- --- ---------
NPQRGV+ProximaNova-Light             Type 1C           Custom           yes
yes yes    124  0
*MHGLSX+ProximaNova-Regular           Type 1C           WinAnsi
yes yes yes    125  0*
NPQRGV+ProximaNova-Bold              Type 1C           Custom           yes
yes yes    126  0
MHGLSX+Facit-Bold                    Type 1C           Custom           yes
yes yes    127  0
NPQRGV+ProximaNova-Bold              Type 1C           WinAnsi          yes
yes yes    218  0
NPQRGV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes yes    219  0
ProximaNova-Bold                     Type 1C (OT)      Custom           yes
no  no       8  0
ProximaNova-Light                    Type 1C (OT)      Custom           yes
no  no       9  0
NPQRGV+ProximaNova-Bold              Type 1C           WinAnsi          yes
yes yes    251  0
NPQRGV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes yes    252  0
NPQRGV+ProximaNova-Bold              Type 1C           WinAnsi          yes
yes yes    254  0
NPQRGV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes yes    255  0
FJORTL+ProximaNova-Light             CID Type 0C       Identity-H       yes
yes yes    165  0
NPQRGV+ProximaNova-Bold              Type 1C           WinAnsi          yes
yes yes    259  0
NPQRGV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes yes    260  0

$pdffonts merged.pdf
name                                 type              encoding         emb
sub uni object ID
------------------------------------ ----------------- ---------------- ---
--- --- ---------
AYOVHV+Facit-Bold                    Type 1C           Custom           yes
yes yes    131  0
AYOVHV+ProximaNova-Bold              Type 1C           Custom           yes
yes yes    132  0
AYOVHV+ProximaNova-Light             Type 1C           Custom           yes
yes yes    133  0
AYOVHV+ProximaNova-Semibold          Type 1C           WinAnsi          yes
yes yes    134  0
ProximaNova-Light                    Type 1C (OT)      Custom           yes
no  no       9  0
AYOVHV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes no     192  0
AYOVHV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes no     193  0
NPQRGV+ProximaNova-Light             Type 1C           Custom           yes
yes yes    275  0
*MHGLSX+ProximaNova-Regular           Type 1C           WinAnsi
yes yes yes    276  0*
NPQRGV+ProximaNova-Bold              Type 1C           Custom           yes
yes yes    277  0
MHGLSX+Facit-Bold                    Type 1C           Custom           yes
yes yes    278  0
NPQRGV+ProximaNova-Bold              Type 1C           WinAnsi          yes
yes yes    437  0
NPQRGV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes yes    438  0
ProximaNova-Bold                     Type 1C (OT)      Custom           yes
no  no     462  0
ProximaNova-Light                    Type 1C (OT)      Custom           yes
no  no     512  0
NPQRGV+ProximaNova-Bold              Type 1C           WinAnsi          yes
yes yes    500  0
NPQRGV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes yes    501  0
NPQRGV+ProximaNova-Bold              Type 1C           WinAnsi          yes
yes yes    503  0
NPQRGV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes yes    504  0
FJORTL+ProximaNova-Light             CID Type 0C       Identity-H       yes
yes yes    377  0
NPQRGV+ProximaNova-Bold              Type 1C           WinAnsi          yes
yes yes    451  0
NPQRGV+ProximaNova-Light             Type 1C           WinAnsi          yes
yes yes    452  0

Why are the field values not showing up and how can I fix that?

Thanks for your help!

Johannes

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message