

To use it, just download and install the tool on your machine/server. It is compatible with Windows, macOS and the major Linux distros, including Debian, Ubuntu and even Arch Linux.

It runs “headless”, thus not requiring a display service. Wkhtmltopdf is a popular open-source command line tool used to generate PDFs out of HTML. However, the downside being that if your project requires a more sophisticated PDF being generated, you might look into tailored (even premium) solutions, depending on your use case. Engineers also stated that Playwright is more stable than Puppeteer Sharp.

The API documentation can get you up and running in no time as people love the fact that this is easy to set up. It doesn’t have any dependencies other than the Playwright driver and the actual browsers, and so, here is how to install it from the package manager console: dotnet add package PlaywrightSharpĪnd here is how to use it ( source): using var playwright = await Playwright.CreateAsync() Īwait using var browser = await () Īwait page.ScreenshotAsync(path: outputFile) Īs stated previously the implementation is similar to Puppeteer, the difference being that Playwright works in Edge. Playwright is the Microsoft’s version of a browser automation tool built also in C# used for the same purposes as Puppeteer, including but not limited to, PDF generation and automation UI testing by crawling your SPA. Var browser = await Puppeteer.LaunchAsync(new LaunchOptions Here is an example of setting it up and generate a PDF in a C# ASP.NET application: await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultRevision) Here is a nice video explaining how this is used. Test Chrome Extensions: should you roll like that.Automating form submissions: useful especially for UI/E2E (end-to-end) testing.This framework can be used for a multitude of reasons, some of which being:

The engine is similar to how Selenium works. It is a framework written in C# and according to the Google, “a Node library which provides a high-level API to control headless Chrome and Chromium” ( source). It is developed and maintained by Google. Puppeteer Sharp is an open-source browser automation tool used for generating PDFs out of the DOM. At the end of which, there will be a list of honorable mentions, that people have also used and enjoyed. Well, here are top 3 most appreciated tool on the market. So, which one should you choose when your business asks you to implement PDF Generation or you just want to plug it into your app to fill in the gaps? What’s more, there are tons of frameworks and tools out there and the process is even more overwhelming. You’d be surprised, but this can become a difficult decision to make especially if you’ve been away from. Many people ask “What is the best tool for generating PDFs?”.
