Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7518930A for ; Sun, 26 May 2013 19:27:27 +0000 (UTC) Received: (qmail 56225 invoked by uid 500); 26 May 2013 19:27:27 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 56211 invoked by uid 500); 26 May 2013 19:27:27 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 56203 invoked by uid 99); 26 May 2013 19:27:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 May 2013 19:27:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gilad.denneboom@gmail.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bk0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 May 2013 19:27:23 +0000 Received: by mail-bk0-f47.google.com with SMTP id jg1so3274045bkc.20 for ; Sun, 26 May 2013 12:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=/cc0ZQDrDuxn3Q/OEAzGFGraoHYROUm2DZeeVBI3Gnk=; b=aNApDDtUlfnyyH4+Jpz/A9rsF2r34quZGedjQCQnphIZ4LthtuPTh48DcnHMrsVCWW SYDmbds4WpJkx7L0M717mf8vzne2N2ntP8DH8cLXXrPTNS411e4T9Qvi/UKZ1lb8diUM sXrAVD5xtqujlyB0Iwx8B+g2i+ZypUwYfWlo4QaNHPeoF3ikSuagxyltMWDa5kz7C63B egFR9w6TEKwGPgb2/vXEFy6M80V0F9J+/ZrUdRVAuisRku+/U4HnznOHqBc5y6NEav5q 4t4JLQiaBXdC7vTUYNpBJVet6s6CWo80JdEY0UEXopZbjcfcvGglnIA95s4DWsrBYgTX fmzw== X-Received: by 10.204.226.136 with SMTP id iw8mr11209986bkb.135.1369596422127; Sun, 26 May 2013 12:27:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.36.4 with HTTP; Sun, 26 May 2013 12:26:42 -0700 (PDT) In-Reply-To: References: From: Gilad Denneboom Date: Sun, 26 May 2013 21:26:42 +0200 Message-ID: Subject: Re: PDFBox 1.8.1 thinks this PDF has 0 pages? To: "users@pdfbox.apache.org" Content-Type: multipart/alternative; boundary=485b3970cf4c3a2fe504dda40466 X-Virus-Checked: Checked by ClamAV on apache.org --485b3970cf4c3a2fe504dda40466 Content-Type: text/plain; charset=ISO-8859-1 Most likely because this document is encrypted, and PDFBox respects that... Try running it on a non-encrypted version of the file and see if that works (or decrypt the file in your code, if you know the password). On Sun, May 26, 2013 at 9:09 PM, Leonard Teo wrote: > Hi guys, > > I'm having an issue with a specific PDF and PDFBox 1.8.1. > > This is what I'm doing: > List pages = doc.getDocumentCatalog().getAllPages(); > pages.size() will return 0 > > Here is the PDF: > > https://dl.dropboxusercontent.com/u/1413139/Est_Limits_of_Civil_Government.pdf > > Full Source Code: > https://gist.github.com/leonardteo/a1dec98bfd1cbe6b919d > > Do you guys know what is the issue with this specific PDF that would be > causing PDFBox to think that it has 0 pages? > > Thanks, > > Leonard > > > > > -- > Leonard Teo > Ballistiq Digital, Inc. > http://www.ballistiq.com > 2001 University Street, Suite 1700 > Montreal, QC H3A 2A6 > > Cell: 514 512 9873 > Skype: leonardteo > --485b3970cf4c3a2fe504dda40466--