pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Downloadind a pdf file doesn't work
Date Fri, 12 Dec 2014 17:50:23 GMT
This sounds more like a http problem. Try setting a user agent like a 
browser.

https://stackoverflow.com/questions/2529682/setting-user-agent-of-a-java-urlconnection

Tilman

Am 12.12.2014 um 11:53 schrieb Walter Kehl:
> 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
View raw message