I'm currently looking on an ASP.NET Core library capable of managing HTML/CSS code to PDF rendering, but the case here is that it needs to work on Linux. Docker image on Linux, more specifically.

  • I've implemented ABCPdf, it was really nice but unfortunately the HTML feature is Windows only.
  • I've tried JsPdf and Html2Pdf (JavaScript approach), it worked but there are so many limitations and the font is always cut off on new PDF pages.
  • I've tried Puppeteer Sharp. At first I thought that I got what I needed, but it requires Chrome/Chromium installation on Docker image, and so on, the memory usage would raise up. It didn't work too.

So, given the past few years, I've been searching for an option here. No success so far. If anyone could give any idea, I would really appreciate it!

2 Answers 2


I recommend trying the DocumentConverter class from LEADTOOLS. (Disclosure: I’m a LEAD employee).

There’s a tutorial titled Convert Files with the Document Converter - .NET Core that describes how to use this class.

In particular, look at the function named static void ConvertToDocument() in the tutorial, which produces PDF files from any document format.

If you would like to try it, there’s a free evaluation edition on this page.

  • I appreciate your answer but unfortunately I can't pay for that. It's too expensive as well. If it was a free library I would give it a try, for sure :) Commented Apr 7, 2021 at 23:06

I found the solution some months later.

The library iTextSharp.LGPLv2.Core could reach exactly what I was looking for, generating the PDF inside docker Linux from HTML string. I have used ASP.NET Core 3.1.

There are some few code samples there on description test methods as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.