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

Free Support Forum - aspose.com

Viewer.Print call prints only first section ignoring the rest

I generate a document using Aspose.Words and save it to a folder in local machine. The document contains more than one sections. I open this document using Aspose.Words.Viewer to print to a printer. It always prints only the first section. Do I need to print each sections individually or am I missing something? Following is the vb code I use to print. The Aspose.Words.dll version I use is

Public Function PrintDoc(ByVal documentName As String, ByVal PrinterName As String) As Boolean
Dim returnVal As Boolean = False
Dim oViewer As New Aspose.Words.Viewer.DocumentRenderer
oViewer.PrinterSettings.PrinterName = PrinterName
oViewer.Document = New Aspose.Words.Document(documentName)
returnVal = True
Catch ex As Exception
oViewer.Document = Nothing
oViewer = Nothing
End Try
Catch ex As Exception
End Try
Return returnVal 
End Function

Many Thanks

The point is Aspose.Words.Viewer is currently at beta stage and normally we do not provide technical support for it as described here
At the moment we are working on a rendering module with completely different codebase and we hope to have it finished in April.

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