sbkrishnan25
08-05-2011, 01:39 AM
Hi
Please help me
I am in the process of creating html to pdf using ABCPdf.net 8.0.
It is working fine in my local machine, but it is not working in server it through s error like "Cannot activate MSHtml engine. Please refer to documentation for more information. "
This is my code
Doc theDoc = new Doc();
int docid = 0;
theDoc.Rect.Inset(15, 10);
docid = theDoc.AddImageUrl(GetASBaseUrl() + "HTMLFiles/" + filename + ".htm");
while (true)
{
theDoc.FrameRect();
if (!theDoc.Chainable(docid))
break;
theDoc.Page = theDoc.AddPage();
docid = theDoc.AddImageToChain(docid);
}
string pdfFilename = System.Guid.NewGuid().ToString() + ".pdf";
theDoc.Save(Server.MapPath("~/PDFFiles/" + pdfFilename));
Please help me
I am in the process of creating html to pdf using ABCPdf.net 8.0.
It is working fine in my local machine, but it is not working in server it through s error like "Cannot activate MSHtml engine. Please refer to documentation for more information. "
This is my code
Doc theDoc = new Doc();
int docid = 0;
theDoc.Rect.Inset(15, 10);
docid = theDoc.AddImageUrl(GetASBaseUrl() + "HTMLFiles/" + filename + ".htm");
while (true)
{
theDoc.FrameRect();
if (!theDoc.Chainable(docid))
break;
theDoc.Page = theDoc.AddPage();
docid = theDoc.AddImageToChain(docid);
}
string pdfFilename = System.Guid.NewGuid().ToString() + ".pdf";
theDoc.Save(Server.MapPath("~/PDFFiles/" + pdfFilename));