简体   繁体   English

打印DOC文件-Aspose.Words

[英]Print DOC files - Aspose.Words

Recently i was working on this library and made some small programs just to check the functionality. 最近,我正在研究该库,并制作了一些小程序来检查其功能。 Now at this point i just know that we can Print Doc files by using Aspose.Words Java Library. 现在,我只知道我们可以使用Aspose.Words Java库打印Doc文件。

What i need to ask is How can I select Printer programatically using Aspose.Words. 我需要问的是如何使用Aspose.Words以编程方式选择打印机。 We already have option to show Print Dialog and then user can select Printer. 我们已经可以选择显示“打印对话框”,然后用户可以选择“打印机”。 But i need to do it with out Showing any Dialog. 但是我需要在不显示任何对话框的情况下进行操作。 And one more request if you can help regarding setting Tray Number programatically, I'd be obliged. 如果您能以编程方式帮助设置纸盘编号,还有其他要求,我有义务。 Thanks a lot for looking into my issue. 非常感谢您调查我的问题。

Regards, Maher 问候,马希尔

Using the Aspose.Words API, you can select the printer by specifying the printer name. 使用Aspose.Words API,您可以通过指定打印机名称来选择打印机。

Document doc = new Document(srcDoc);
doc.print("Microsoft XPS Document Writer");

I work with Aspose as Developer Evangelist. 我与Aspose一起担任开发人员推广人员。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM