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

Free Support Forum - aspose.com

(Presales) FileCorruptedException when loading an RTF file containing a particular JPEG image

When I try to load an RTF document containing the JPEG Baseline 444 image from http://www.w3.org/MarkUp/Test/xhtml-print/20050519/tests/A_2_1-BF-01.htm I get a FileCorruptedException.
Steps to reproduce: Save that test image to disk. Using MS Word 2003 SP2, do Insert\File and browse to that test image. Save as C:\Temp\testimage.rtf. Then from VS2005 execute

Aspose.Words.Document document = new Aspose.Words.Document(@"C:\Temp\testimage.rtf", LoadFormat.Auto, "");

It works fine if I save and load as DOC instead of RTF. Any idea what the problem is?

I followed the reproduction steps and I was able to load the resulting RTF document without any problems. Please attach the problematic document to your post. Besides, do you use the latest version of the Aspose.Words?
And maybe you should try Insert | Picture | From file instead of Insert | File?

Hi, thanks for the response. I’m attaching the file. I was using version but I’ve reproduced it with
Sorry, Insert \ Picture \ From File is what I meant. That’s what I did to create this document.

I still can’t reproduce the error with current codebase. Probably the error was fixed since 4.2.6 was out. Please wait for the forthcoming hotfix supposed to be released in several days.

Hi, I just tried this with Aspose.Words 4.4.3 and the problem does appear to have been fixed for this JPEG, but now I’m getting the same problem using numerous RTF documents containing Enhanced Metafiles. I’m attaching a sample.
Extracting images from RTF is the main use we have for Aspose.Words. I was about to place an order, but the latest version is failing on many of the customer EMF images I have. Can you look into this?

Thanks for your reporting this problem to us. I managed to reproduce the problem. I have logged this problem to our defect database as issue # 4396. Please expect a reply before the next hotfix (within 2-3 weeks). We might just fix it by then or provide more information
Best regards.

The issue you have found earlier (filled as 4396) have been fixed in this upgrade.