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

Free Support Forum - aspose.com

SaveToImage() causing NullReferenceException

Hi,

We are using Aspose.Network & Aspose.Words to convert msg files to tif images.
We have been using Aspose.Network.dll (4.7.2.4) & Aspose.Words.dll (6.6.0.0) for above task.

We updated Aspose.Words.dll (6.6.0.0) to Aspose.Words.dll (8.2.1.0) for ISSUE 7835.
Now following code which worked with 6.6.0.0 throws Exception with 8.2.1.0:


using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Aspose.Words;
using Aspose.Words.Rendering;
using Aspose.Network.Outlook;

namespace OutlookTester
{
class Program
{
static void Main(string[] args)
{
Aspose.Network.License licenseNetwork = new Aspose.Network.License();
licenseNetwork.SetLicense("Aspose.Network.lic");

Aspose.Words.License licenseWords = new Aspose.Words.License();
licenseWords.SetLicense("Aspose.Words.lic");

MapiMessage msg = MapiMessage.FromFile("Outlook.msg");

using (MemoryStream rtfStream = new MemoryStream())
{
TextWriter tw = new StreamWriter(rtfStream);
tw.Write(msg.BodyRtf);
tw.Flush();

Document doc = new Document(rtfStream);

ImageOptions imgOptions = new ImageOptions();
imgOptions.Resolution = (float)200;
imgOptions.TiffCompression = TiffCompression.Ccitt4;

for (int i = 0; i < doc.PageCount; i++)
doc.SaveToImage(i, 1, "image" + i.ToString() + ".tif", imgOptions); // Exception Here!
}
}
}
}


Please test above code with attached Outlook.msg file with Aspose.Words.dll (6.6.0.0) & Aspose.Words.dll (8.2.1.0).

This issue was reported from our customer as critical issue that must be fixed ASAP.
It is being used in production environment and fix is urgent.

Please provide us with an ETA for a fix so that we can tell our customer.

Thank You.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

Hi Andrey,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Can you confirm that this issue will be fixed in the next release? Can you provide a timeframe when that release will be available? We are looking for a fix as soon as possible as it is rather urgent for us.

Thank you.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Aspose.Words releases are published every 4-5 weeks. Please expect a reply before the next hotfix. We might just fix the problem by than or provide you more information.

Best regards.

Hello,

Any ETA for when this fix will be available?

Thank you,

Robert

Hello

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. This problem is already resolved in the current codebase. The fix will be included into the next hotfix, which will be released within two weeks. You will be notified.

Best regards,

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The new release has corrected the problem.

Thank you,
Robert