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

Maruan Sahyoun commented on PDFBOX-2868:
----------------------------------------

[[email protected]] thanks for the report. My last commit should fix the 
NPE. OTOH a PDNonTerminalField doesn't have a value of it's own but the value 
is used to be inherited by (PDTerminalField) childs to the PDNonTerminalField. 
Although it was necessary to fix the issue it might be better to only output 
values of PDTerminalField instances as otherwise the same value might show up 
multiple times.

> NPE in Acroform getValueAsString
> --------------------------------
>
>                 Key: PDFBOX-2868
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2868
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.0
>            Reporter: Tim Allison
>            Assignee: Maruan Sahyoun
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: 543014.pdf
>
>
> The most common exception in the first run of 2.0.0-trunk against govdocs1 is 
> this:
> {noformat}
> java.lang.NullPointerException
>       at 
> org.apache.pdfbox.pdmodel.interactive.form.PDNonTerminalField.getValueAsString(PDNonTerminalField.java:181)
>       at 
> org.apache.tika.parser.pdf.PDF2XHTML.addFieldString(PDF2XHTML.java:615)
>       at 
> org.apache.tika.parser.pdf.PDF2XHTML.processAcroField(PDF2XHTML.java:580)
>       at 
> org.apache.tika.parser.pdf.PDF2XHTML.extractAcroForm(PDF2XHTML.java:567)
>       at org.apache.tika.parser.pdf.PDF2XHTML.endDocument(PDF2XHTML.java:201)
>       at 
> org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:250)
>       at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:137)
>       at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:132)
> {noformat}



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

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

Reply via email to