Cross platform nuget HTML to PDF in ASP.NET Core

Viewed 885

I'm working on the task to convert HTML to PDF. Our site is hosted on a Linux Docker container.

I tried many NuGet packages, from last week, but could not find a proper solution.

I tried all these packages:

  • Itextsharp
  • Select.Htmltopdf
  • wkhtmltopdf
  • hiqpdf

Can anyone suggest or show an example for a cross platform HTML to PDF conversion library?

Thanks in advance.

1 Answers

I had the same problem and I used HakanL/WkHtmlToPdf-DotNet which is a wrapper for the wkhtmltopdf tool. The package includes all necessary binaries for running on Windows, Linux, MacOSX and Docker. I tested it on Windows and Linux with .NET 6 and it worked without any problems.

Related