can we post HtmlHELPER object to dynamicpdf to create a pdf ?
because previouly we used itextsharp. Now we are migrating to DynamicPdf.
below is code. Appreciate your help.
StringReader sr = new StringReader(sb.ToString());
Document pdfDoc = new Document(PageSize.A4, 5f, 5f, 10f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter writer = PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
PdfWriter.GetInstance(pdfDoc, new FileStream(filename, FileMode.Create));
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.ContentType = "application/pdf";
//Response.AddHeader("content-disposition", "attachment;filename=DocumentUpload.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);