how to add image file with itextSharp in asp.net C#. And which namespace is required
Image jpg** = Image.GetInstance(new Uri(URL))
how to add image file with itextSharp in asp.net C#. And which namespace is required
Image jpg** = Image.GetInstance(new Uri(URL))
You can use iTextSharp.text.Image
for adding images. Something like this:
iTextSharp.text.Image pic = iTextSharp.text.Image.GetInstance(image, System.Drawing.Imaging.ImageFormat.Jpeg);
myDocument.Add(pic);
Where myDocument is the object of Document
Class of itextsharp
Here if one details article which discuss handling images in itextsharp
http://www.mikesdotnetting.com/Article/87/iTextSharp-Working-with-images
and may be you might be interested in going through documentation also, so here is the link:
You can try this
using(Stream ImageStream = new FileStream(imageUrl, FileMode.Open, FileAccess.Read, FileShare.Read))
Image image = Image.GetInstance(ImageStream);