Printing from DocumentRenderer does not work

Hi,

I have downloaded the latest Aspose.Words-Demo. I have tried the following:

DocumentRenderer docRend = new DocumentRenderer(@"C:\test.doc");
docRend.Print();

But I get an error:

An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in aspose.words.dll

************** Exception Text **************
System.ArgumentOutOfRangeException: Number was less than the array's lower bound in the first dimension.
Parameter name: srcIndex
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
at Aspose.Words.Viewer.DocumentRenderer.᪱(Int32 ގ, Int32 ࡴ)
at Aspose.Words.Viewer.DocumentRenderer.Print()

Any tips?

Thanks Tom

Please attach the document that causes the error.

here is the file…

Hi,

This will be fixed in 1-2 weeks.

FYI I was just doing a test to see if print quality had improved from 3.5.0.0 to 3.5.3.0. In version 3.5.0.0 my doc printed but quality is poor and for some reason it printed an extra blank page (may be related to some issue with replacing text in merge fields vs. print not sure). I updated using the dll only version to 3.5.3.0 and reran the test and got the error as mentioned in the first posting in this thread.
SO if you really need printing (and quality isn’t an issue) then try version 3.5.0.0.

Thanks for the tip. Please note we do not generally improve the beta viewer; these fixes are occasional and “unofficial”. Instead, we make every effort to complete the “production” version of the viewer as soon as possible. However, we ought to release quality product so we work scrupulously on every single feature and this might affect the ETA. As to this particular issue, it will be fixed in the upcoming Aspose.Words 3.6 as promised.

FYI to anyone wanting to get the May 2nd 3.6.0.0 released version, printing is not working - same error message/behavior as releases after 3.5.0.0.

Sorry had no time to address this, there were pretty many fixes in 3.6. Please expect this in 3.6.1 which will be out very soon.

We’ve released Aspose.Words 3.6.1.

  • Aspose.Words.Viewer Beta throws an exception when you attempt to print.

https://docs.aspose.com/words/net/release-notes/

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