Free Support Forum -

XLSX to PNG conversion produce only black image in C# .NET


I came across a very strange issue. When using GroupDocs.Conversion 20.4 to convert a specific XLSX file to PNG, a completely black image is produced.
The really strange thing is, that this only happens when PagesCount = 1 is set as conversion option.
If this option is removed, the image looks normal. (173.8 KB)

        using (var conv = new Converter("BlackThumbnail.xls"))
            var options = new ImageConvertOptions()
                Format = FileTypes.ImageFileType.Png,
                PagesCount = 1
            string filePath = @"outputConversion{0}.png";
            Contracts.SavePageStream getPageStream = page => new FileStream(string.Format(filePath, page), FileMode.Create);
            conv.Convert(getPageStream, options);
1 Like


This issue is reproduced at our end. We’ll now further investigate it. Your investigation ticket ID is CONVERSIONNET-3934. As there’s any update, you’ll be notified.

1 Like