简体   繁体   English

打印多个PDF文件而不显示打印机对话框

[英]Print multiple PDF files without showing Printer Dialog

我想在Web应用程序ASP.Net + C#中创建一个方法作为输入参数PDF文件路径,然后打印所有它而不显示选择打印机对话框,因此它使用默认打印机打印。

The best you can do is concatenate the PDF files into one file and then print it, showing the printer dialog once at the beginning of the process. 您可以做的最好的事情是将PDF文件连接成一个文件,然后打印它,在过程开始时显示一次打印机对话框。 There are many commercial .NET PDF libraries that have this functionality. 有许多具有此功能的商业.NET PDF库。

Disclaimer: I work at Atalasoft. 免责声明:我在Atalasoft工作。 Here the code for doing it with DotImage 这里是用DotImage做代码的代码

PdfDocument.Combine("Output.pdf", "doc1.pdf", "doc2.pdf", "doc3.pdf");

http://www.atalasoft.com/products/dotimage/white-papers/building-pdf-documents-with-dotimage http://www.atalasoft.com/products/dotimage/white-papers/building-pdf-documents-with-dotimage

A web application cannot silently print to a client's printer. Web应用程序无法以静默方式打印到客户端的打印机。 This will be a violation of the browser security model. 这将违反浏览器安全模型。 Browsers and PDF browser plugins have to show a dialog box and prompt the user to allow printing. 浏览器和PDF浏览器插件必须显示一个对话框并提示用户允许打印。

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

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