Hi ,
I am doing code in WCF.
I have created pdf on my local machine but now i want save my pdf in uri of local/server.
How to write pdf in uri (i want to give a local/server uri) using ItextSharp.
writer = PdfWriter.GetInstance(doc, new FileStream(HttpContext.Current.Server.MapPath("~/myproj/pdf"), FileMode.Create));
Above code is not working, giving an error "Object Reference not set to an instance of an Object"
pdfwriter object i.e writer is showing null by debug.
but when i giving simple path like below , then its working properly. filpath="D:/";
writer = PdfWriter.GetInstance(doc, new FileStream(filpath, FileMode.Create));
but as i said want to create pdf by giving uri of local/server.
writer = PdfWriter.GetInstance(doc, new FileStream(HttpContext.Current.Server.MapPath("~/myproj/pdf"), FileMode.Create));
and this code is not working.
so plz help me ..
Thanks,