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

Free Support Forum - aspose.com

InvalidArgument Exception thrown while loading word document

Hi, am trying to open a word document. With some documents i get an argument exception like this when creating a new PageNavigator instance.

code is as follows

...
DocumentRenderer renderer = new DocumentRenderer(this.filename);
this.wordNavigator = new PageNavigator(renderer);
...

Exception is System.ArgumentException: Invalid parameter
Callstack and sample word document are attached to this posting
version is aspose word 4.4.2.0

Please help

Best Regards

Andreas

Hi

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 # 4129. Please expect a reply before the next hotfix (within 2-3 weeks). We might just fix it by then or provide more information

Also note that Aspose.Words.Viewer namespace is currently in beta.

Best regards.

Hi

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

We are happy to tell you that the new Rendering Engine has replaced the “old Viewer Beta”. The Rendering Engine can print, save as images or draw onto .NET Graphics object any document page.

The Problem you have experienced with “old Viewer” does not occur with new Rendering Engine. You can download the latest version of Aspose.Words from here:

http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry158153.aspx

Also new Rendering engine allows you to convert Word document to PDF directly (without using Aspose.Pdf).

Please see Aspose.Words documentation to learn more about new features.

SaveToImage method renders document pages into images:

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.document.savetoimage_overloads.html

SaveToPdf method converts the whole document or selected pages to PDF.

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.document.savetopdf_overloads.html

Best regards.