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

Tilman Hausherr edited comment on PDFBOX-4235 at 5/31/18 4:51 PM:
------------------------------------------------------------------

The NPE is because it's "Tf" and not "tf". Now we need to come up with a 
meaningful exception, that tells that the font is missing, and/or post a 
meaningful log message when a bad operator is used.


was (Author: tilman):
The NPE is because it's "Tf" and not "tf". Now we need to come up with a 
meaningful exception, that tells that the font is missing, and/or that post a 
meaningful log message when a bad operator is used.

> NPE when setting the DA of a PDTextField
> ----------------------------------------
>
>                 Key: PDFBOX-4235
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4235
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.9
>            Reporter: Christoph Grimmer-Dietrich
>            Priority: Major
>         Attachments: F2_Datenblatt_022015.pdf, stacktrace.txt
>
>
> The following Kotlin Code results in a NullPointerException:
> {{when(pdField) {}}
> {{is PDTextField -> {}}
> {{     try {}}
> {{         pdField.value = value?.toString() ?: ""}}
> {{     } catch (ioException: IOException) {}}
> {{         pdField.cosObject.setString(COSName.DA, "/Helv 0 tf 0 g")}}
> {{         pdField.value = value?.toString() ?: ""}}
> {{    }}}
> }}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to