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

Free Support Forum - aspose.com

Print word document using non-default printer

Aspose Team,

I want to print out word document which created by Aspose.word using non-default printer in the system. I am wondering if you could show me the sample code how to do it using Aspose.word component.

Thanks a lot
Alan

Hi

Thank you for your interest in Aspose.Words. You can print document using the following code.

Document doc = new Document(@"Test042\in.doc");
DocumentRenderer renderer = new DocumentRenderer(doc);
renderer.Print();

Also you can specify print option while printing document using Aspose.Words.Viewer. See the following link for more information.
https://reference.aspose.com/words/net/aspose.words/document/print/

renderer.PrinterSettings.PrinterName = "myprinter";

I hope this could help you.

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