如何从“云端”自动发送打印作业服务器到打印机?

发布于 2024-09-15 07:48:38 字数 393 浏览 3 评论 0原文

一张图片应该值 1000 个字,所以让我们看看这是否可以稍微缩短这篇文章......本质上,我正在研究“如何”编写一个在云中的 Web 服务器上运行的解决方案将向办公室 1 内的打印机(标签打印机)发送打印命令。

打印作业实际上是 ASP.NET Web 应用程序中工作流程的一部分,如果可能的话,我希望将所有代码保留在一个应用程序中。我该怎么做呢?

出于安全考虑,我应该避免在 Office 1 中创建一个从“云”中提取数据并使用“云”向下推送命令的新应用程序。我实际上是从 ASP.NET 应用程序中的代码角度来看待这个问题,并且还可能超越打印机上的服务器故障/超级用户问题。不过,我会将其留到以后的问题中。

替代文字

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).

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?

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.

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

2024-09-22 07:48:38

从编码的角度来看,从框架的 3.0 版本开始,有 System.Printing 命名空间,提供用于将打印作业发送到本地、远程或专用打印机设备的类。特别是,感兴趣的类可能是 PrinServerPrintQueuePrintTicket

对于 3.0 之前的框架版本,您可以使用 spooler api 函数来完成类似的任务。您可以在 pinvoke.net 找到一些 pinvoke 签名。

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.

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.

以往的大感动 2024-09-22 07:48:38

另一种选择是使用 Google 云打印。

虽然该存储库适用于 Mono,但它应该适用于 C#。

GitHub MonoGCP。

Another alternative is using Google Cloud Print.

While the repo is for Mono, it should work for C#.

GitHub MonoGCP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文