EML with attachment file not converting to pdf

Hello Team,
we recently upgraded GroupDocs version and after that we are unable to convert the eml with attachements to pdf (getting an exception conversion from () to pdf PDF is not supported). with older version it is working. below are the details of what we updated

GroupDocs.Conversion 22.2.0 to 23.1.0
.Net framework 4.6.1

FYI i’m gettings same error when trying to convert to pdf in demo site image.png (39.0 KB)

@MeghanaVaitla

Please share following details and we’ll look into this issue:

  • Problematic EML file
  • Sample conversion code

@atir.tahir

  • i’m unable to upload EML as it doesn’t support here to upload. but, I don’t think it is problematic as i can open it properly and also with old version of GroupDocs.Conversion it can able to convert to pdf
  • image.png (19.6 KB)

@MeghanaVaitla

Please compress the file to a ZIP format and then upload.

1 Like

EML - Outlook Express.zip (316.1 KB)

@MeghanaVaitla

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

@atir.tahir
so, the file has any problem for conversion or GroupDocs doesn’t support EML with attachements conversion?
also it is worked in older version for same file is there any fix around to make it work?
Thanks!

@MeghanaVaitla

EML with attachments conversion is supported. Please take a look at this documentation article - Load email document with options.
However, we are investigating the provided file. We’ll notify you in case of any progress update.

so, if we use that logic to load attachments in eml will it give multiple pdfs? one for email itself and each pdf for attachments?

also is there a way to avoid loading of attachments?

1 Like

@MeghanaVaitla

Yes, it’ll give multiple PDF files.

Please take a look at this EmailLoadOptions reference. ConvertOwned is the option to control whether the owned documents in the documents container must be converted.

//CSharp code to convert email and avoid attachments conversion 
const string source = "email file";
var loadOptionsProvider = (FileType fileType) =>
{
    if (fileType is EmailFileType)
    {
        return new EmailLoadOptions
        {
            ConvertOwned = false
        };
    }
    return null;
};
using (var converter = new Converter(source, loadOptionsProvider))
{
    var options = new PdfConvertOptions();
    converter.Convert("converted.pdf", options);
}

The issues you have found earlier (filed as CONVERSIONNET-6041) have been fixed in this update. This message was posted using Bugs notification tool by nikola.yankov