The ABCpdf .NET ABCChrome65 runtime for HTML to PDF conversion using the Chrome 65 rendering engine. ABCpdf operates three HTML rendering engines for insertion of HTML content. The ABCChrome engine provides google Chrome style HTML conversion. The MSHTML engine leverages IE as installed on the local machine. The Gecko runtime adds Firefox-style HTML rendering to the mix. Placed HTML support means your HTML can be treated just like any other media - placed wherever you like on the page. Paged HTML support allows you to flow your HTML from one area to another - across pages or columns or both. A vast range of options gives you full control over the HTML rendering process and DOM. In terms of features, probably most notably, the Gecko and Chrome engines support repeated table headers and footers. They are also extremely good on SVG and AJAX for charts and maps. The MSHTML and Chrome engines tend to be faster and the MSHTML engine provides a more literal screen based output. ABCChrome and Gecko generally support modern HTML features better than MSHTML.
$ dotnet add package ABCpdf.ABCChrome65This is the ABCChrome65 HTML conversion module.
It is intended for use with the ABCpdf NuGet package. ABCChrome will not function without it.
First you need to ensure you are using the correct namespace. Insert the following at the top of your C# module.
using WebSupergoo.ABCpdf13;
You select this HTML conversion module by setting the HtmlOptions.Engine property.
For example, if you are in a forms or console application, the following may be useful.
using (Doc doc = new Doc()) {
doc.HtmlOptions.Engine = EngineType.Chrome65;
doc.AddImageUrl("http://www.google.com/");
doc.Save(@"C:\_output.pdf"); // adjust path for your needs
}
Alternatively if you are running under ASP.NET, you may want a Page_Load function something like this.
byte[] theData = null;
using (Doc doc = new Doc()) {
doc.HtmlOptions.Engine = EngineType.Chrome65;
doc.AddImageUrl("http://www.google.com/");
theData = doc.GetData();
}
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "inline; filename=MyPDF.PDF");
Response.AddHeader("content-length", theData.Length.ToString());
Response.BinaryWrite(theData);
Response.End();
For more example projects, please download the installer bundle from the ABCpdf download site.
Documentation for ABCpdf can be found here:
https://www.websupergoo.com/helppdfnet/
Alternatively you can download the installer bundle from the ABCpdf download site as this contains full documentation in CHM format.