It's not feasible to compare PDF files byte-by-byte because the PDF creation uses DeflateStream which produces different results on different platforms (Linux/macOS/Windows and .NET Framework/.NET Core), see https://github.com/dotnet/runtime/issues/30539
Running the tests on macOS would fails because the compressed stream computed on macOS is slightly different from the one computed on Windows.
The conversion uses Docnet.Core (which is a wrapper around the PDFium C++ library that is used by Chromium) for PDF rendering and ImageSharp to create the PNG from the rendered buffer. This method does not rely on any external tool such as ghostscript to be installed on the machine since the pdfium native dll is embedded in the Docnet.Core NuGet package for all platforms (Linux + macOS + Windows 32 and 64 bits).
It's not feasible to compare PDF files byte-by-byte because the PDF creation uses DeflateStream which produces different results on different platforms (Linux/macOS/Windows and .NET Framework/.NET Core), see https://github.com/dotnet/runtime/issues/30539
Running the tests on macOS would fails because the compressed stream computed on macOS is slightly different from the one computed on Windows.
The conversion uses Docnet.Core (which is a wrapper around the PDFium C++ library that is used by Chromium) for PDF rendering and ImageSharp to create the PNG from the rendered buffer. This method does not rely on any external tool such as ghostscript to be installed on the machine since the pdfium native dll is embedded in the Docnet.Core NuGet package for all platforms (Linux + macOS + Windows 32 and 64 bits).