如何从“云”自动发送打印作业。服务器到打印机?
图片应该是1000个字,所以让我们看看是否可以缩短这篇文章...基本上,我正在研究如何编码的解决方案,运行在Web服务器上将向办公室1(标签打印机)内的打印机发送打印命令的云。
A picture is supposed to be worth a 1000 words, so let's see if that can shorten this post up a bit... Essentially, I'm looking into "how" to code a solution that runs on the web server within the cloud that will send a print command to a printer within office 1 (label printer).
打印作业实际上是ASP.NET Web应用程序中的工作流程的一部分,我希望尽可能将所有代码保留在单个应用程序中。
The print job is really part of work flow within the ASP.NET web application and I would like to keep all of the code within a single application if possible. How can I go about doing this?
由于安全性,我应该避免在Office 1中创建一个新的应用程序,从云中提取数据并拥有云 用于向下推命令。我真的在ASP.NET应用程序的代码立场看这个,也可能超越更多的打印机上的服务器故障/超级用户问题。
Due to security, I should avoid creating a new application within Office 1 that pulls data from the "cloud" and have the "cloud" be used to push the command downward. I'm really looking at this from a code standpoint within the ASP.NET app and also potentially transcending into more of a serverfault/superuser question on the printer. I'll save that for a future question there though.
从编码的角度看,从框架的3.0版本开始, http://msdn.microsoft.com/en-us/library/ms574466.aspx =nofollow noreferrer> System.Printing
命名空间,其提供将打印作业发送到本地,远程或专用打印机设备的类。特别地,感兴趣的类可以是 PrinServer
, PrintQueue
和 PrintTicket
。
From a coding perspective, starting with version 3.0 of the framework, there is the System.Printing
namespace, which provides classes for sending print jobs to a local, remote, or dedicated printer appliance. In particular, classes of interest may be PrinServer
, PrintQueue
, and PrintTicket
.
对于3.0之前的框架版本,请使用假脱机程序API函数完成类似任务。您可以在 pinvoke.net 找到一些pinvoke签名。
For versions of the framework prior to 3.0, you can use the spooler api functions to accomplish similiar tasks. You can find some pinvoke signatures at pinvoke.net.