静默打印PDF [英] Silently Printing PDF
问题描述
我编写了一个C#程序,该程序使用ITextSharp库在内存流中的内存中构建PDF文档.我希望我的应用程序使用某些打印机选项(即双面打印)将文档自动打印到特定的打印机.静默打印的所有示例似乎都涉及将PDF写入文件并在进程中触发Adobe Reader并发送命令行选项.有没有一种使用打印文档"进行打印的方法?关于如何设置打印机选项的任何建议?如果有帮助的话,它将是Richo打印机.
Hi,
I have written a C# program that uses ITextSharp libarary to build a PDF document in memory in a Memory Stream. I want my application to automatically print the document to a certain printer with certain printer options (i.e duplex). All of the examples of silent printing seem to involve writing the PDF out to file and firing a Adobe Reader in a process and sending command line options. Is there a way to print using Print Document? Any advice on how to set the printer options? It will be a Richo printer if that helps.
推荐答案
我认为一个重要的事情是,必须设置一台默认打印机.然后将该打印机设置为实用程序并应用打印命令.
I think one importent thing is, there must be one default printer need to set. And then set that printer to your utility and apply print command.
http://msdn.microsoft.com/zh-cn/library/system.drawing.printing.printdocument.aspx
希望对您有帮助.
谢谢和问候
Praveen
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx
Hope this will help you.
Thanks and regards
Praveen
这篇关于静默打印PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!