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

Free Support Forum - aspose.com

Content is intechanged when we transform a msg file which has mix of html and richtext format

Hi,


I am using the following code:-

MailMessage message;
String fileName = new File(inputFile).getName();
message = MailMessage.load(inputFile, MessageFormat.getMsg());
fileName = fileName.substring(0, fileName.lastIndexOf("."));
String mhtFile = outputFile + “\” + fileName + “.mhtml”;
message.save(mhtFile, MailMessageSaveType.getMHtmlFromat());
Document document = new Document(mhtFile);
String output = outputFile + “\” + fileName + “.” + “pdf”;
document.save(output, SaveFormat.PDF);

I have attached the output. As you can see, if the message is composed of richtext as well as HTML, then the PDF obtained by transforming this message contains images that were supposed to be attachments but somehow, it is considered as an inline image.

Thanks,
Nitesh

Hi Nitesh,

Could you please specify which input MSG file you are using in your tests as the provided files contain multiple MSG files. We’ll investigate the issue in detail and assist you further in this regard.

Hi Kashif,


Thanks for the prompt reply.
The 2 mail messages were attached for your convenience.
Let me explain a bit more:-
hai.msg -> This is the message that has been formatted as HTML and contains embedded images.
FW hai.msg -> This is the message that has been formatted as Rich text and contains images as attachments. Basically, this is a forward on top of hai.msg. This is also the message file that has been used to convert to PDF. You can try to convert this message to PDF and see the output.
FW hai.pdf -> This is the output obtained after converting “FW hai.msg” to PDF. You can see the issue here.

Please let me know if you require further clarifications.

Thanks,
Nitesh

Hi Nitesh,


I was able to reproduce this issue at my end using the latest version of Aspose.Email for .NET 4.5.0 and have logged it as NETWORKNET-34496 in our issue tracking system for further investigation by our development team. Once there is some update available in this regard, we’ll write back here via this thread.

Hi Kashif,


Thanks for the prompt response.
Will there be a corresponding fix in Java also? I am asking this because we are using Aspose.Email for Java.

Thanks,
Nitesh

Hi Nitesh,


Our Java versions of the API are ported from the .NET version. Thus, an issue fixed in .NET version is automatically fixed in Java and is part of the next release. We’ll update you here once the fix version is available in this regard. The equivalent ticket hence created has id: NETWRKJAVA-33413 for your reference.

Please move this to Enterprise Support, and let me know the ETA?


Thanks,
Ajesh

Hi Ajesh,


Thank you for writing to Aspose support again.

I have raised the priority of this issue and for monitoring purpose you may check it here. This issue is still under investigation and expected to be resolved in the upcoming release, however I will write back here in case of availability of any update in this regard.

The issues you have found earlier (filed as NETWORKNET-34496) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(1)

Hi,


Which JAVA release of Aspose.Email is this issue fixed in? The version mentioned by you is the .NET version. Does this mean that the issue is fixed in the latest Java release or I need to wait for the next release for the code to be ported?

Thanks,
Nitesh

Hi Nitesh,

We are sorry for a wrong notification. The Java equivalent version of this .NET ticket is NETWRKJAVA-33413 that has already been fixed and will be available in the upcoming version of Aspose.Email of Java 4.6.0. We are currently in process of QA testing of this new version and it will be available for download in a couple of days. You will be notified once the fix version is available for download.

The issues you have found earlier (filed as NETWRKJAVA-33413) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.