Hello,
We are trying to migrate our project from Windows to Linux Containers and we came across an issue where given all the same parameters and same file, different PNG images are being generated on Windows and on Linux when using PngDevice.Process().
The interesting part is that the final PDF document that is generated on both OS’s looks identical but there is also a difference when comparing bytes. That is not really an issue to us since the final PDF looks identical, however the PNG images being generated on Linux look different and far worse than the ones generated on Windows. This is an issue since we display these PNGs to customers as they manipulate the document. This difference in images is more obvious when the document is zoomed in and everything appears more bold from Linux.
Please see the small sample project I’ve created with an included PDF document that reproduces this issue. Simply take the project, restore dependencies, and run on Windows, and then do the same on Linux to see the difference in outputs.
Another issue with this difference in output is that the images generated on Linux end up being 2.5X bigger while still being the same resolution as the ones generated on Windows.
I believe this is a bug and any help or work arounds to make the PNG image look the same is appreciated. I have already tried increasing the resolution on the PngDevice to 400 which makes it looks pretty similar but still lower quality than on Windows, and this increases the file size from 200kb on Windows to 1500kb on Linux which isn’t sustainable.
Also the only fonts being used in this document are the following, and I’ve made sure Microsoft’s TrueType fonts are installed in the Linux Container.
Arial-BoldMT
Calibri
Verdana-Bold
Verdana
Thank you
Image comparisons:
Linux:
1-linux-output.png (510.8 KB)
Windows:
1-windows-output.png (213.8 KB)
Diff:
png diff.png (10.8 KB)
Final PDF output documents:
linux-output-pdf.pdf (286.6 KB)
windows-output-pdf.pdf (293.7 KB)
Sample Project:
comparing-windows-linux.zip (250.6 KB)