content += "<!DOCTYPE html ><html xmlns='http://www.w3.org/1999/xhtml' style='background: url(
http://clients.anaxusinfotech.com/sales ... ges/22.jpg);' ><head><title></title><style type='text/css' media='all'>*{margin: 100px;padding: 100px;}body{margin:0;padding:0;font-family:Arial,Helvetica,sans-serif;color:#333;width: 1335px;}</style></head><body >";
PD4ML pd4ml = new PD4ML();
PD4PageMark header = new PD4PageMark();
StringBuilder strstyle = new StringBuilder();
pd4ml.HtmlWidth = (htmlWidth);
pd4ml.addStyle("@page : body{font-family: Calibri, Helvetica, sans-serif, Verdana;}.innertext{font-family: Calibri, Helvetica, sans-serif, Verdana;color: #efefef;}", true);
pd4ml.enableTableBreaks(true);
pd4ml.addStyle("TABLE,DIV {page-break-inside: auto !important}", true);
pd4ml.PageSize = PD4Constants.getSizeByName("A4");
Byte[] byteArray = Encoding.ASCII.GetBytes(content);
MemoryStream stream = new MemoryStream(byteArray);
pd4ml.render(stream, new System.IO.FileStream(stroutpath, System.IO.FileMode.Create));
Response.ContentType = "Application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + pdfname + ".PDF");
Response.TransmitFile(Server.MapPath("GeneratePDF/" + pdfname + ".PDF"));
Response.End();
stream.Flush();
stream.Close();
stream.Dispose();