Am 13.06.2019 um 01:16 schrieb Harry Melamed:
I'm new to PDF Box and I am trying to load a PDF from a link.

I get an error message:

https:/
spstest.mckesson.com/iPledgeUI/rems/pdf/resources/iPledge_REMS_Non_Compliance_Action_Policy.pdf
(No File or directory)

This is the code

PDDocument doc = PDDocument.load(new
File("https://spstest.mckesson.com/iPledgeUI/rems/pdf/resources/iPledge_REMS_Non_Compliance_Action_Policy.pdf";));


That isn't a file, that is an URL. Load these with

import java.net.URL;

....

PDDocument doc = PDDocument.load(new URL("....").openStream());

however I get HTTP error 503. That is a different problem. (I didn't test with 
a browser)

Tilman

PS please post such questions to the users mailing list, not to the dev mailing 
list. See also
https://pdfbox.apache.org/support.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to