Search code examples
c#asp.netpdfpdf-generationabcpdf

Using an HTML file as template for creating PDFs with ABCpdf


How do I use an HTML as a template then just replace the text in it and then convert it to PDF using ABCpdf? Are there any sample codes to do this? Thanks in advance!

I'm using C# ASP.NET


Solution

  • http://www.websupergoo.com/helppdf6net/source/5-abcpdf6/doc/1-methods/addimageurl.htm

    Pass the absolute path of html template on the server into the AddImageUrl function.

    Doc theDoc = new Doc();
    theDoc.AddImageUrl("http://www.google.com/");
    theDoc.Save(Server.MapPath("htmlimport.pdf"));
    theDoc.Clear();