pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christian zanata <christian.zan...@archeometra.it>
Subject PDFont is null?
Date Thu, 19 Feb 2009 12:29:54 GMT
Hi to all,
I'm trying to fill a Form using PDFBox,
but when I run org.apache.pdfbox.examples.fdf.SetField I obtain an
output like this:

Exception in thread "main" java.lang.NullPointerException
        at org.apache.pdfbox.pdmodel.common.COSDictionaryMap.put(COSDictionaryMap.java:106)
        at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.getFontAndUpdateResources(PDAppearance.java:439)
        at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.setAppearanceValue(PDAppearance.java:267)
        at org.apache.pdfbox.pdmodel.interactive.form.PDVariableText.setValue(PDVariableText.java:131)
        at org.apache.pdfbox.examples.fdf.SetField.setField(SetField.java:59)
        at org.apache.pdfbox.examples.fdf.SetField.setField(SetField.java:100)
        at org.apache.pdfbox.examples.fdf.SetField.main(SetField.java:81)

I debug the code and it seems that in the dictionary there are only font names witout values

PDAppearance.getFontAndUpdateResources line 438 returns null (but in the Map the element is
present).

Maybe my system doesn't load the fonts? the render of a PDF works fine.


thanks

chris


Mime
View raw message