We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

PDF to PNG conversion issue in .NET

Hello. We have encountered an issue with PDF to PNG conversion on some files that is related to a specific PDF structure. Problem is observed only on Linux based environments. The same code with the same file is working fine on Windows.

Original PDF: black_square_test_1.pdf (177.3 KB)
Converted PNG thumbnail: converted_original.png (488 Bytes)

The same issue is observed when using Aspose.PDF conversion on Linux: converted_new_1.png (75.6 KB)

It is probably related to the following document structure: Screenshot 2021-07-21 023429.jpg (361.7 KB)

Also after some time of debugging library sources I understand that any conversion is started with generating TIFF source(e.g. PDF->PNG will be done as PDF->TIFF->PNG). Intermediate TIFF on Linux is generated with different quality settings, e.g. BitsPerPixel is lower which significantly affects resulting image quality that is also a problem for us.
Windows: windows_conversion.png (33.3 KB)
Ubuntu: ubuntu_convert.png (558.6 KB)

Tried multiple output formats, but nothing helped.

OS: Ubuntu 20 or Docker image mcr.microsoft.com/dotnet/aspnet:5.0 with fixes from here https://github.com/groupdocs-conversion/GroupDocs.Conversion-for-.NET/blob/master/Examples/Dockerfile
.NET 5, GroupDocs.Conversion 21.5.0

License order ID: 200618095930


We are investigating this issue with ticket ID CONVERSIONNET-4742. You’ll be notified in case of any update.