ABCChrome
This is the ABCChrome117 HTML conversion module for Linux.
The base ABCpdf NuGet package includes ABCChrome117 for Windows but not for Linux because of size constraints.
To deploy to Linux you will need to reference this package in addition to the base ABCpdf package. At that point you can publish to Linux.
See the following section of the documentation for a walkthrough.
https://www.websupergoo.com/helppdfnet/source/2-getting_started/6-platforms.htm
Example Code
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.Chrome117;
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.Chrome117;
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
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.