You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2015/07/15 21:37:05 UTC

[jira] [Commented] (PDFBOX-2885) NPE in PDNonTerminalField.getChildren()

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

John Hewson commented on PDFBOX-2885:
-------------------------------------

Indeed, a link annotation isn't a field.

> NPE in PDNonTerminalField.getChildren()
> ---------------------------------------
>
>                 Key: PDFBOX-2885
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2885
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: John Hewson
>             Fix For: 2.0.0
>
>         Attachments: 437113.pdf
>
>
> {code}
> java.lang.NullPointerException
> 	at org.apache.pdfbox.pdmodel.interactive.form.PDNonTerminalField.getChildren(PDNonTerminalField.java:130)
> 	at org.apache.pdfbox.preflight.process.AcroFormValidationProcess.validateField(AcroFormValidationProcess.java:196)
> 	at org.apache.pdfbox.preflight.process.AcroFormValidationProcess.exploreFields(AcroFormValidationProcess.java:114)
> 	at org.apache.pdfbox.preflight.process.AcroFormValidationProcess.validate(AcroFormValidationProcess.java:64)
> 	at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:84)
> 	at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:122)
> 	at org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:163)
> 	at com.mycompany.preflightmasstest.PreflightChecker.run(PreflightChecker.java:52)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> {code}
> The "field" / annotation that makes the problem is at "36 0 o", it is the link annotation.
> From my understanding, this is an incorrect PDF, a link annotation isn't a field. I tried returning just null, that change works with preflight.



--
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