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

Free Support Forum - groupdocs.com

Exception when converting certain EML to PNG in .NET

Converting the attached EML file to PNG leads to the following exception:
GroupDocs.Conversion.Exceptions.FileTypeNotSupportedException: 'Can not save to tiff'

GroupDocs.Conversion 21.9.1 was used with .NET Framework 4.7.2 and the following code:

            var possibleLoadOptions = Converter.GetPossibleConversions(Path.GetExtension(documentPath));
            var loadOptions = possibleLoadOptions.LoadOptions;
            using (var conv = new Converter(documentPath, () => loadOptions))
            //using (var conv = new Converter(documentPath))
            {
                var options = new ImageConvertOptions()
                {
                    Format = FileTypes.ImageFileType.Png,
                    PageNumber = 1,
                    PagesCount = 1,
                    Width = 256
                };
                conv.Convert(() => new FileStream("thumbnail.png", FileMode.OpenOrCreate), options);
            }

The issue only happens when “loadOptions” are provided, without them the PNG is correctly created.
So it might be related to something that the GetPossibleConversions sets incorrectly.

Bestellung (1).zip (3.0 KB)

@Clemens_Pestuka

This issue is reproduced at our end. Hence, we’ve logged it in our internal issue tracking system with ID CONVERSIONNET-4895. You’ll be notified in case of any update.

1 Like