Requirement: Convert email messages from GMail to TIFF files.
Issue: Some emails having some unnecessary special characters on converted TIFF image using Aspose. I have converted the email body using “imageMagick” tool, and there are no issues.
.NET Code: I am reading the email using Imap4Client, read each message to MailMessage and export the email body to TIFF format. Below are the source code.
MailMessage mailMsg = imap.FetchMessage(Email_ID.ToString());
using (MemoryStream ms = new MemoryStream())
{
mailMsg.Save(ms, Aspose.Email.Mail.SaveOptions.DefaultMhtml);
ms.Position = 0;
Document doc = new Document(ms);
Aspose.Words.Saving.ImageSaveOptions options = new Aspose.Words.Saving.ImageSaveOptions(Aspose.Words.SaveFormat.Tiff);
options.TiffCompression = TiffCompression.Ccitt4;
options.TiffBinarizationMethod = ImageBinarizationMethod.FloydSteinbergDithering;
options.Resolution = EDMConstants.TIFF_RESOLUTION;
options.UseAntiAliasing = true;
options.UseHighQualityRendering = true;
options.ImageBrightness = 0.7f;
doc.Save(emailBodyFullPath, options);
}
Problem: Email body(from Gmail) is not displayed with any special characters. Printed output is also not displaying any special characters. But TIFF output file is having some accented/special characters. I am attaching the TIFF file output. Below is the EML file text.
EML body:
I=C2=92ve attached the death certificate=2E Thanks again for your help on t=
his,=20
I really appreciate it!
Regards,
Could you please provide a solution for the above issue.