Sending Word document to a printer

Hi,

Is it possible in Aspose.Words to send a document to any printer I like ?

Kind regards

Hi

Thanks for your inquiry. Yes you can do that. Please see the following code example:

Document doc = new Document(@"Test191\in.doc");
DocumentRenderer renderer = new DocumentRenderer(doc);
renderer.PrinterSettings.PrinterName = @"\\10.100.167.152\hp LaserJet 1010 Series Driver";
renderer.Print();

But note that Aspose.Words.Viewer namespace is currently in beta and limited technical support is provided for it.

Best regards.

how can i get access to the beta. when is the planned release ?

Hi

Thanks for your inquiry. Aspose.Words.Viewer namespace is included into Aspose.Words. See the following link for more information.

Hopefully this feature will be fully supported within few months.

Best regards.

When I send my document to a printer it only prints two pages, , the second being blank.

Attached, you’ll find my document I try to print.

In the code intTest equals 2 when I debug.

My code :

Private Sub CreatePDF(ByVal strFinalDocument As String, ByVal strPrinterName As String)

Dim renderer As DocumentRenderer

Dim intTest As Integer

Try

renderer = New DocumentRenderer(strFinalDocument)

renderer.PrinterSettings.PrinterName = strPrinterName

intTest = renderer.GetPages().Length

renderer.Print()

Catch ex As Exception

WriteError("Printing failed: " & ex.Message)

End Try

End Sub

Hi

Thanks for your request. As I told you earlier this feature is currently in beta and limited technical support is provided for it. Hopefully this feature will be fully supported within few months.

Best regards.

That is really bad news.

We we’re hoping that you could help us.

Because we need it this week to work, not within a few months.

Hi

Thanks for your inquiry. You can try to change formatting of your document or split the document. Maybe this could help you.

Best regards.

Can you tell me when the viewer is supported ?

Kind regards,

Hi

Thanks for your request. This feature is already supported. You should use Aspose.Words.Rendering now. Please see release notes of Aspose.Words 6.0.0 for more information.

Best regards.

Thanks, it works !!