I’m using Aspose to open an RTF file so that it can be converted into a Word file, but when there is a problem such as a missing bracket in the RTF, it doesn’t give an error, it just carries on but renders it badly. Is there any way to get it to check for RTF errors?
Hi Ben,
Thanks for your request. If Aspose.Words encounters a problem that can be resolved upon loading a document, it recovers a document silently and does not throw any exceptions. It would be great if you attach your RTF document here for testing. We will check it and provide you more information.
If Aspose.Words encounters a problem that cannot be resolved upon loading a document, Aspose.Words throws an exception. Usually in such case, FileCorruptedException is thrown.
Best regards,
OK, here is my example. There are 2 versions of the same file attached, one has a missing bracket. When you open it up it displays with only 4 pages instead of 6, no error thrown.
Hi
Thank you for additional information. As I can see, MS Word does the same, i.e. it shown only four pages in the second “broken” document. So I suppose, Aspose.Words just mimics MS Word behavior in this case.
Technically, this file is not corrupted, both MS Word and Aspose.Words can read information from this file. And the missed bracket is considered as end of file.
Best regards,
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.