Set images on Pdf using itextsharp

Zhxlqvip

New Member
I am working on WCF service to create a pad file and want to set image on created pdf. Below is my code. it gives me error "object reference not set to an object instance"\[code\] string str = System.Web.HttpContext.Current.Request.MapPath("App_Data/suc.png"); Image imgCheckBoxChecked = Image.GetInstance(str); \[/code\]The other thing I try and it gives me error :Could not find file 'C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\suc.png: Below is my other code\[code\] Image imgCheckBoxChecked = Image.GetInstance("App_Data/suc.png"); cell.AddElement(imgCheckBoxChecked); cell.Colspan = 4; table.AddCell(cell);\[/code\]Any idea on how to solve this error and set image on pdf.Thanks
 
Top