You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2018/05/31 19:06:00 UTC

[jira] [Resolved] (PDFBOX-4235) NPE when setting the DA of a PDTextField

     [ https://issues.apache.org/jira/browse/PDFBOX-4235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-4235.
-------------------------------------
       Resolution: Fixed
         Assignee: Tilman Hausherr
    Fix Version/s: 3.0.0 PDFBox
                   2.0.10

> 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
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.10, 3.0.0 PDFBox
>
>         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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org