You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2015/02/04 11:21:34 UTC

[jira] [Comment Edited] (PDFBOX-1234) NPE at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.calculateFontSize(PDAppearance.java:551)

    [ https://issues.apache.org/jira/browse/PDFBOX-1234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14304890#comment-14304890 ] 

Maruan Sahyoun edited comment on PDFBOX-1234 at 2/4/15 10:20 AM:
-----------------------------------------------------------------

I've added PDFBOX-2661 and PDFBOX-2662 to not forget about enhancements to AcroFoms to provide a fallback mechanism for incomplete/non compliant AcroForm/field resource definitions.


was (Author: msahyoun):
I've added PDFBXO-2661 and PDFBOX-2662 to not forget about enhancements to AcroFoms to provide a fallback mechanism for incomplete/non compliant AcroForm/field resource definitions.

> NPE at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.calculateFontSize(PDAppearance.java:551)
> -------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-1234
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1234
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 1.8.4, 2.0.0
>            Reporter: Christer Palm
>            Assignee: Maruan Sahyoun
>             Fix For: 2.0.0
>
>         Attachments: 200221.pdf, FontTest.java, Fonts.pdf, SetPDFFieldValueTest.java, fw8bene--dft.pdf
>
>
> Using SVN trunk revision 1291094 (2012-02-18)
> Getting the following stack trace when trying to call PDField.setValue() on a AcroForm field in the attached document;
> java.lang.NullPointerException
> 	at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.calculateFontSize(PDAppearance.java:551)
> 	at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.insertGeneratedAppearance(PDAppearance.java:371)
> 	at org.apache.pdfbox.pdmodel.interactive.form.PDAppearance.setAppearanceValue(PDAppearance.java:281)
> 	at org.apache.pdfbox.pdmodel.interactive.form.PDVariableText.setValue(PDVariableText.java:131)
> Reason seems to be that PDApperance.getFontAndUpdateResources() returns null, in turn because the font dictionary for the DA of the field ("/Cour 11 Tf 0 g") is not present in the document.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org