Use C# to print HTML to PDF with a few lines of code
Use C# to Convert HTML to PDF with only a few lines of code or build your own C# HTML to PDF programs with the best and easiest to learn PDF SDK on the market.
No C# programming skills are needed. Stop wasting your time studying multivolume SDK documentation. Use easyPDF Action Center to generate sample C# code.
All it is needed just to place a few lines of the following C# code:
Type type = Type.GetTypeFromProgID("easyPDF.Loader.8");
Loader oLoad = (Loader) Activator.CreateInstance(type);
Printer oPrin = (Printer) oLoad.LoadObject("easyPDF.Printer.8");
IEPrintJob oIEPJob = oPrin.IEPrintJob;
IESetting oIESet = oIEPJob.IESetting;
oIESet.PrintBGColor = true;
oIEPJob.PrintOut(Server.MapPath (@".\input.htm"), Server.MapPath(@".\output.pdf"));