Return-Path: Delivered-To: apmail-incubator-pdfbox-dev-archive@locus.apache.org Received: (qmail 54343 invoked from network); 4 Aug 2008 18:27:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Aug 2008 18:27:05 -0000 Received: (qmail 15530 invoked by uid 500); 4 Aug 2008 18:27:04 -0000 Delivered-To: apmail-incubator-pdfbox-dev-archive@incubator.apache.org Received: (qmail 15505 invoked by uid 500); 4 Aug 2008 18:27:04 -0000 Mailing-List: contact pdfbox-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pdfbox-dev@incubator.apache.org Delivered-To: mailing list pdfbox-dev@incubator.apache.org Received: (qmail 15494 invoked by uid 99); 4 Aug 2008 18:27:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 11:27:04 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 18:26:17 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 37E8D234C185 for ; Mon, 4 Aug 2008 11:26:44 -0700 (PDT) Message-ID: <653432157.1217874404214.JavaMail.jira@brutus> Date: Mon, 4 Aug 2008 11:26:44 -0700 (PDT) From: "Jukka Zitting (JIRA)" To: pdfbox-dev@incubator.apache.org Subject: [jira] Created: (PDFBOX-361) NullPointerException in PDPageNode.getAllKids MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org NullPointerException in PDPageNode.getAllKids --------------------------------------------- Key: PDFBOX-361 URL: https://issues.apache.org/jira/browse/PDFBOX-361 Project: PDFBox Issue Type: Bug Components: Parsing Reporter: Jukka Zitting [Issue from SourceForge] http://sourceforge.net/tracker/index.php?func=detail&aid=2008371&group_id=78314&atid=552832 The parser cannot seem to find the Pages object in files created with Acrobat Pro 9. A sample file is attached. public static void main(String[] argv) throws Exception { String name = "./test.pdf"; PDDocument doc = PDDocument.load(name); doc.close(); PDPageNode root = doc.getDocumentCatalog().getPages(); ArrayList pages = new ArrayList(); root.getAllKids(pages); System.out.println("pages.size() == "+pages.size()); } Exception in thread "main" java.lang.NullPointerException at org.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:194) at org.pdfbox.pdmodel.PDPageNode.getAllKids(PDPageNode.java:182) http://sourceforge.net/tracker/download.php?group_id=78314&atid=552832&file_id=283367&aid=2008371 [Comment on SourceForge] Date: 2008-07-02 00:57 Sender: foundart Logged In: YES user_id=1693709 Originator: YES This happens with the latest code from CVS and also in older versions. [Comment on SourceForge] Date: 2008-07-14 17:25 Sender: orthello Logged In: YES user_id=853566 Originator: NO We are experiencing the same problem. Offending pdf available if any of you need it (jwilson@nmcourt.fed.us). Looks like pdfbox does not support some new feature introduced in Acrobat 9. [Comment on SourceForge] Date: 2008-07-14 23:20 Sender: foundart Logged In: YES user_id=1693709 Originator: YES In Acrobat 8, the default was to generate PDFs following version 1.4 of the PDF specification. In Acrobat 9, the default is to to generate PDFs following version 1.5 of the PDF specification. PDF1.5 has objects known as cross-reference streams and it turns out that PDFBox does not parse them correctly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.