pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: Downloadind a pdf file doesn't work
Date Fri, 12 Dec 2014 17:55:12 GMT
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 <walter.kehl@outlook.com> 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
> 
> 
> 
> 
> 
> 
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message