I am using Aspose.Email.dll for .Net version 1.2.0.0 to convert MSG file to Tif format. The output tiff file's 1st and last page is empty. Please let me know the reason for this empty pages and how to avoid this in C# application. I have attached the test MSg file and output tiff file for your reference.
We have just released a new version of Aspose.Email for .NET v1.3.0 with support for exporting email messages to XPS and TIFF file formats. Please check the below source for your reference, also attached is the image produced by your provided sample message.
C#
var message = Aspose.Email.Mail.MailMessage.Load(“FW Anubhava - Sathva_copy.msg”);
var printer = new Aspose.Email.Printing.MailPrinter();
printer.Print(message, “output.tiff”, Aspose.Email.Printing.PrintFormat.Tiff);
Please note that Aspose.Email.Printing namespace is available in all assemblies of Aspose.Email for .NET v1.3.0 with an exception of 2.0.
The attached Output.tif file does not contains From, To, Date and subject informations. Please let me know how to include those details into tiff output.
I am afraid, with current implementation of MailPrinter class you will not be able to include the email header information (From, To, CC and Subject fields) in your resultant Tiff image. We already have this enhancement on our roadmap and I have linked this thread to the appropriate issue (Id:33109) from our tracking system. You will be notified automatically once this feature is available. Thank you for your understanding in this regard.
Regarding the sample shared by you in your original post. I have converted the MSG file to MHTML and then TIFF (with latest version of Aspose.Email v1.3.0 and Aspose.Words v10.8.0). The MHTML does not have extra space in start or end but the TIFF file has extra page at the end. Attached is an archive containing my output for your reference.
I am going to move this thread to the appropriate forum (Aspose.Words) for further assistance.
Thanks for your inquiry. I’m a representative from the Aspose.Words team. The problem occurs because the dimensions of some images are too big to fit inside a page upon converting to fixed page formats e.g: TIFF. Also, there are found some special characters, e.g. LineBreak, NonBreakingSpace, between images which are causing an extra page at the end. As a work around, I would suggest you please use the following code snippet:
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan