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

Free Support Forum - aspose.com

Thumbnail generation throws Invalid Parameter error

Aspose.Words.Viewer.DocumentRenderer renderer = new Aspose.Words.Viewer.DocumentRenderer();
Aspose.Words.Document aDoc = new Aspose.Words.Document();
switch (fileExt.ToUpper())
    case "DOC":
        aDoc = new Aspose.Words.Document(docStream, "", Aspose.Words.LoadFormat.Auto, "");
    case "DOCX":
        aDoc = new Aspose.Words.Document(docStream, "", Aspose.Words.LoadFormat.Docx, "");
renderer.Document = aDoc;
Image FV_thumbnail = (Image)renderer.GetPage(1);

This throws Invalid Parameter error for some documents. Please advice

Thanks for your interest in Aspose.Words. Could you please attach your document for testing?
But note the Aspose.Words.Viewer namespace is currently in beta and limited technical support is provided for it.
Best regards.

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.

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

Saving to image

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

Saving to Pdf

The latest version of Aspose.Words is available for download from downloads section or from NuGet