如何从Web服务器访问客户端打印 [英] How to access client side print from web server

查看:86
本文介绍了如何从Web服务器访问客户端打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望从我的网页打印销售而不显示打印预览

提前感谢

Want to print sales from my webpage without showing the print preview
thanks in advance

推荐答案

不,你就是无法统治来自您自己的服务器的客户端环境。如果大多数浏览器,当代码执行打印文件时,浏览器会显示一个简单的用户友好对话框,供用户在最终将数据发送到打印机进行打印之前编辑文档。



例如,一个简单的JavaScript命令,如下所示,用于打印客户端的当前Web文档。



No, you just cannot rule over the client's environment from your own server. If most browsers, when the code executes to print the files, the browsers show a simple user-friendly dialog box, for the user to edit the document before finally sending the data to the printer to print it.

For example, a simple JavaScript command, as below is used to print the current web document for the client.

window.print();





但是,这会导致浏览器显示打印对话框。也许是因为软件(浏览器)想让用户告诉要打印多少份,从哪个页面打印到哪个页面等等。



But, this would cause the browser to display a print dialog. That maybe, because the software (browser) wants to let the user tell how many copies to print, from which page to which page to be printed, and so on and so forth.


这篇关于如何从Web服务器访问客户端打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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