I am using iTextHandler to convert xml to pdf it creates pdf but does not open it and gives error pdf cannot be opened because it is already opened
Here is my code
string pdfFile = "PeerReview5" + ".pdf";
string strPath = Server.MapPath(Request.ApplicationPath.ToString() + "\12\") + pdfFile;
Document document = new Document();
PdfWriter.GetInstance(document, new FileStream(strPath, FileMode.Create));
document.Open();
ITextHandler xmlHandler = new ITextHandler(document);
xmlHandler.Parse(Server.MapPath("12\Peer_Review_Referral_Form_Template.xml"));
document.Close();