从 Web 应用程序打印到客户端打印机 [英] Printing to a client printer from a web app

查看:32
本文介绍了从 Web 应用程序打印到客户端打印机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一台打印机直接连接到电脑(带有打印机的信息亭),我将如何为网页(.net web 应用程序)在没有用户的情况下将 jpg 打印到信息亭打印机除了点击页面上的按钮之外的干预?

If I have a printer hooked directly to a pc (a kiosk with a printer), how would I go about creating the ability for a web page (.net web app) to print a jpg to the kiosks printer with no user intervention other than clicking a button on the page?

推荐答案

如果您创建了一个托管 Web 浏览器控件的应用程序(而不是直接使用 Web 浏览器),您可以更直接地控制打印过程.

if you created an application that hosted the web browser control (rather than using a web browser directly) you could control the printing process much more directly.

(假设可以使用 Windows + IE)

(assuming using Windows + IE is possible)

以下是一些可能有帮助的示例文章:

here are some example articles that might help:

配置网络浏览器控件

在 C# 应用程序中使用 Web 浏览器控件

以及不断变化的 WebBrowser 类的 MSDN 文档,该类具有 Print 方法.

and the ever changing MSDN docs for the WebBrowser class, which has the Print method.

来自打印方法的备注:您可以使用此方法来实现类似于 Internet Explorer 中的打印按钮.此方法无需进一步的用户输入即可打印当前文档."

From the print method remarks: "You can use this method to implement a Print button similar to the one in Internet Explorer. This method prints the current document without requiring further user input."

这篇关于从 Web 应用程序打印到客户端打印机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆