2

How can I convert an image from a url and convert it into a "iTextSharp.text.Image" object or png file to use here instead using the image directly using C#:

 iTextSharp.text.Image jpg = iTextSharp.text.Image.GetInstance(IMAGEOBJECT);
War
  • 8,539
  • 4
  • 46
  • 98

1 Answers1

0

Other than the url bit this appears to be a duplicate question, but the answer is here ...

https://stackoverflow.com/a/58912/342932

... getting an the svg from a url can be done with HttpClient like this ...

var svg = await new HttpClient()
   .GetAsync("url")
   .ReadAsStringAsync()
   .Unwrap();

... this assumes of course that the url only returns the svg in question and nothing else, otherwise you will have to do some parsing of the url's response

Community
  • 1
  • 1
War
  • 8,539
  • 4
  • 46
  • 98
  • This is not an answer . But the claim that the question already exists . So where is the damn code to convert the image as mentioned above ? Where that is not there? – Cristian Capannini May 05 '16 at 07:37