You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2010/06/02 16:39:45 UTC

[jira] Commented: (PDFBOX-737) Fix potential NullPointer exception in PDPageNode

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

Andreas Lehmkühler commented on PDFBOX-737:
-------------------------------------------

Before we include your patch I've one question: Isn't your document well structered or do we have a parser issue? Following the pdf reference the Kids entry in the dictionary is required and not optional. Does your document contain such an entry or is it missing?

> Fix potential NullPointer exception in PDPageNode
> -------------------------------------------------
>
>                 Key: PDFBOX-737
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-737
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0-incubator, 1.0.0, 1.1.0
>         Environment: Windows Vista 32-bit, Java 1.5, HEAD tag of PDFBox
>            Reporter: Adam Nichols
>             Fix For: 1.2.0
>
>         Attachments: PDFBOX-737.patch
>
>
> getAllKids(List result, COSDictionary page, boolean recurse) throws a NullPointerException when page.getDictionaryObject( COSName.KIDS ) returns null.  I have a PDF where this actually happens but I can not provide it due to the confidential information it contains.  I confirmed that once I added the null check that the code worked as expected (the documents I was merging were visible, the page count was correct, etc.).  Patch will be attached momentarily.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.