0

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

Lob City
  • 87
  • 8

2 Answers2

2

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(); 
Phil
  • 4,134
  • 4
  • 23
  • 40
0

will be a nightmare, easiest way is to create a pdf of the web pages with blank spaces for your text, set the measurements to work as topdown and all you need is the X, Y fontname, size and then when your text is submitted you simply add to the specified coordinates.

Fast, very fast and you can just stream that back out as a new PDF

davethecoder
  • 3,856
  • 4
  • 35
  • 66