将文本文件传输到蓝牙打印机MVC .NET网站 [英] Transfer text file to bluetooth printer MVC .NET website

查看:102
本文介绍了将文本文件传输到蓝牙打印机MVC .NET网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正试图找到一种从MVC .NET网站向蓝牙打印机发送简单文本文件的方法。我在一个按钮中思考,当用户点击它时,控制器将文件发送到打印机(以前是用手机/平板电脑/ PC连接的蓝牙)。

有什么想法使用它的库或代码示例吗?

我用MVC .NET构建网站4



提前致谢!



Leo



我的尝试:



Hello, im triying to find a way to send simple text file to a bluetooth printer from a MVC .NET website. Im thinking in a button that when the user clicks it, the controller sends the file to the printer (that was previously bluetooth atached with the phone/tablet/PC).
Any idea wich library or code example to use it?
Im building de website with MVC .NET 4

Thanks in advance!

Leo

What I have tried:

Hello, im triying to find a way to send simple text file to a bluetooth printer from a MVC .NET website. Im thinking in a button that when the user clicks it, the controller sends the file to the printer (that was previously bluetooth atached with the phone/tablet/PC). 
Any idea wich library or code example to use it?
Im building de website with MVC .NET 4

推荐答案

使用ASP.NET / MVC代码无法做到这一点。该代码完全在服务器上运行,而不是在客户端上运行。服务器根本无法访问客户端浏览器,也没有连接到它的任何设备。



您必须使用javascript库来执行此类操作。客户端代码javascript必须将文件发送到打印机。这些库以及允许它们工作的浏览器支持目前都是实验性的。



Google有一些你可能想要阅读的有趣内容,其他 [ ^ ]。
You can't do it using ASP.NET/MVC code. That code runs entirely on the server, not the client. The server will have no access at all to the client browser, nor any devices attached to it.

You have to use a javascript library to do anything like this. The client-side code, javascript, will have to send the file to the printer. Those libraries, and the browser support to allow them to work, are all currently experimental.

Google has something interesting you might want to read on it, here[^] .


这篇关于将文本文件传输到蓝牙打印机MVC .NET网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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