How to Load Pdf From url ? [Resolved]

Posted by Bnote under C# on 6/3/2015 | Points: 10 | Views : 1330 | Status : [Member] | Replies : 2
How to load pdf directly from url? I use C#.
eg:http://beta.wms.egobzmail.com/files/deexp/2015_04/2015_04_16/DE14291484222756.pdf
Thank you.




Responses

Posted by: Bandi on: 6/3/2015 [Member] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
http://stackoverflow.com/questions/18712224/download-save-locally-and-display-pdf-from-a-link
http://stackoverflow.com/questions/7715206/read-a-pdf-file-from-url-to-to-byte-array

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Bnote, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hitu on: 6/5/2015 [Member] Starter | Points: 25

Up
0
Down
You can use WebClient.DownloadData, which has a default return value of a byte array. e.g.
byte[] bytes = myClient.DownloadData("https://www.member-data.com/files/hb/c8955fc4d6160ec0fd87f4879c6496d3.pdf");

Also, this assumes that you want the actual file in a byte array, not the content (text) of the PDF. That's a whole other ball of wax.



-------------------------------------------------
Free .NET PDF http://www.e-iceblue.com/Introduce/pdf-for-net-introduce.html library supporting convert and other operation of PDF.

Bnote, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response