You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Hesham G." <he...@gmail.com> on 2009/10/18 12:48:27 UTC

getNumberOfPages exception

Hello ,

I have a PDF file that when I try to retrieve its number of pages using:     pdfFile.getNumberOfPages();
I get a NullPointerException ... pdfFile cannot be resolved

While I'm sure the pdfFile is defined fine.
I tried to get the number of pages for the same book using a program that uses iText, and it was read fine.

Here is the PDF: http://www.4shared.com/file/141674389/b9fb95b2/test.html
I've tried to attach it with the mail but the message failed to be sent, so I've put it in a public sharing service.

Any ideas why this happens ?

Best regards ,
Hesham G.