We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding image from URL

Thread ID:





147466 Sep 11,2019 04:30 PM UTC Sep 16,2019 05:39 AM UTC ASP.NET Core - EJ 2 3
Tags: PDF
Asked On September 11, 2019 04:30 PM UTC

Is there anyway of getting a stream from a URL image to then save into the PDF rather than a local file ?

Sowmiya Loganathan [Syncfusion]
Replied On September 12, 2019 12:44 PM UTC

Hi Martin, 

Thank you for contacting Syncfusion support.  

We can get a stream from image URL and insert them into PDF document in ASP.NET Core. Please refer the below code snippet for your reference, 

WebClient myWebClient = new WebClient(); 
Stream imageStream = new MemoryStream(bytes); 
//Load the image from the stream 
PdfBitmap image = new PdfBitmap(imageStream); 

Please find the sample for the same, which can be downloaded from the below link, 

Please try the above sample in your end and let us know if it satisfies your requirement.  

Sowmiya L 

Replied On September 14, 2019 09:18 AM UTC

Many thanks works well.

Sowmiya Loganathan [Syncfusion]
Replied On September 16, 2019 05:39 AM UTC

Hi Martin, 

Thank you for the update. We glad to know that your requirement is achieved.  
Sowmiya L 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon