That looks like a bug. As it happens, PDFBox will just write your InputStream 
to a temporary File anyway. The workaround is to just save your data to a 
temporary file yourself and then call PDDocument.load(file).

-- John

> On 12 Dec 2014, at 02:53, Walter Kehl <[email protected]> wrote:
> 
> Hi all,
> 
> 
> 
> I have the following situation:
> 
> 
> 
> I am loading with PdfBox files from the internet with the call
> 
> PDDocument document = PDDocument.load( inputStream );
> 
> 
> 
> So far it has worked nicely, but I have problems with this file :
> http://esa.un.org/unpd/wup/PressRelease/WUP2014_PressRelease.pdf
> 
> 
> 
> After I load it, it is empty, and the call document.getNumberOfPages()
> returns 0.
> 
> However when I download the file manually and then load it into PdfBox, then
> everything is fine.
> 
> 
> 
> Any idea what could be happening? I am currently using PdfBox 1.8.5.
> 
> 
> 
> Thanks and Best Regards
> 
> Walter
> 
> 
> 
> 
> 
> 
> 

Reply via email to