pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    • <bdo id='sml1h'></bdo><ul id='sml1h'></ul>

        <i id='sml1h'><tr id='sml1h'><dt id='sml1h'><q id='sml1h'><span id='sml1h'><b id='sml1h'><form id='sml1h'><ins id='sml1h'></ins><ul id='sml1h'></ul><sub id='sml1h'></sub></form><legend id='sml1h'></legend><bdo id='sml1h'><pre id='sml1h'><center id='sml1h'></center></pre></bdo></b><th id='sml1h'></th></span></q></dt></tr></i><div class="nkyqx80" id='sml1h'><tfoot id='sml1h'></tfoot><dl id='sml1h'><fieldset id='sml1h'></fieldset></dl></div>

      1. <legend id='sml1h'><style id='sml1h'><dir id='sml1h'><q id='sml1h'></q></dir></style></legend>

        <small id='sml1h'></small><noframes id='sml1h'>

        <tfoot id='sml1h'></tfoot>

        POS:讓網(wǎng)站直接打印到定義的本地打印機(jī)

        POS: get a website to print directly to a defined local printer/s(POS:讓網(wǎng)站直接打印到定義的本地打印機(jī))
            • <legend id='mLBCx'><style id='mLBCx'><dir id='mLBCx'><q id='mLBCx'></q></dir></style></legend>
                <bdo id='mLBCx'></bdo><ul id='mLBCx'></ul>

                  <tbody id='mLBCx'></tbody>
                <i id='mLBCx'><tr id='mLBCx'><dt id='mLBCx'><q id='mLBCx'><span id='mLBCx'><b id='mLBCx'><form id='mLBCx'><ins id='mLBCx'></ins><ul id='mLBCx'></ul><sub id='mLBCx'></sub></form><legend id='mLBCx'></legend><bdo id='mLBCx'><pre id='mLBCx'><center id='mLBCx'></center></pre></bdo></b><th id='mLBCx'></th></span></q></dt></tr></i><div class="ynybxoc" id='mLBCx'><tfoot id='mLBCx'></tfoot><dl id='mLBCx'><fieldset id='mLBCx'></fieldset></dl></div>

                <small id='mLBCx'></small><noframes id='mLBCx'>

              • <tfoot id='mLBCx'></tfoot>

                1. 本文介紹了POS:讓網(wǎng)站直接打印到定義的本地打印機(jī)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我有一個運(yùn)行票房服務(wù)的網(wǎng)站,可以發(fā)行門票和報告.我想弄清楚如何將票證(當(dāng)前為 PDF)直接發(fā)送到本地/客戶端 PC 上的指定打印機(jī).

                  I have a website which runs a box office service which issues tickets and reports. I am trying to figure out how to get tickets (currently PDFs) sent directly to a specified printer on a local/client PC.

                  我已經(jīng)關(guān)注了許多舊的/死的/無用的鏈接,但沒有找到任何最新的解決方案,盡管有許多誘人的希望.

                  I have followed many old/dead/useless links and have not found any up-to-date solutions to this although many tantalising glimmers of hope.

                  場景是這樣的:遠(yuǎn)程托管網(wǎng)站 - 連接了 1 個或多個用戶 - 網(wǎng)頁生成票證/s (PDF),以靜默方式發(fā)送到用戶電腦上的指定打印機(jī)(不是默認(rèn)打印機(jī))(無需額外點(diǎn)擊打印提示).

                  The scenario is this: Remote hosted website - 1 or more users connected - web page generates ticket/s (PDF) which is sent to a specified printer on the user pc (not the default printer) silently (no extra clicking through of print prompts).

                  我知道 PHP 無法連接到客戶端的 pc,但是有沒有辦法讓網(wǎng)頁(可能通過 jQuery)連接到已安裝的腳本/服務(wù)?

                  I know PHP does not connect to a clients pc but is there a way for a web page (via jQuery perhaps) to connect to an installed script/service?

                  我在想本地 PC 上的腳本(它建立可信鏈接、設(shè)置要使用的打印機(jī)等)會從 Web 服務(wù)器接收數(shù)據(jù)/文件,然后只要它在同一位置就可以處理它每臺機(jī)器.然后可以將此(本地)腳本添加到需要運(yùn)行該服務(wù)的任何 PC.這項(xiàng)工作需要由正在發(fā)送的文件觸發(fā),并且沒有腳本/服務(wù)每隔幾秒輪詢一個位置.

                  I was thinking the script on a local PC (which establishes a trusted link, sets the printer to use, etc) would receive data/file from the web server and then process it as long as it was in the same place on every machine. This (local) script then can be added to any PC that needs to run the service. The work would need to be trigged by the file being sent and not having a script/service which is sat polling a location every few seconds.

                  任何指針將不勝感激.

                  我嘗試過 jZebra java 小程序,但在它壞掉之前只打印了一次.有興趣是否有人真正讓它工作(以及如何工作).

                  I have tried the jZebra java applet but only got it printing once before it broke. Interested if anyone has actually got it to work (and how).

                  推薦答案

                  我最近遇到了完全相同的問題.谷歌瀏覽器具有所謂的信息亭"模式.因此,它將在沒有用戶干預(yù)的情況下打印.

                  I ran into the EXACT same question recently myself. Google Chrome has what's called a "kiosk" mode. Therefore, it will print without user intervention.

                  為此,請使用以下命令打開 Google Chrome(您需要找到 chrome 可執(zhí)行文件,或 *nix 機(jī)器的 chrome 命令):

                  To do this, open Google Chrome with the following command (you need to find the chrome executable, or chrome command for *nix machines):

                  chrome.exe "http://www.example.com/mypage.php" --kiosk --kiosk-printing
                  

                  這將打開一個沒有任何工具欄、地址欄、多功能框等的窗口.

                  This will open a window without any toolbars, address bars, omniboxes, etc.

                  接下來,您需要打印頁面.為此,請自動打開一個打印對話框(為了演示,我將使用簡單的 Javascript):

                  Next, you need to make a page print. To do this, automatically open a print dialog (for demonstration, I'll use simple Javascript):

                  <script>
                    window.print();
                  </script>
                  

                  在跳轉(zhuǎn)到開發(fā)環(huán)境之前,window.print() 確實(shí)不允許允許任何參數(shù)(即 URL).

                  Before you jump over to your development environment, window.print() does NOT allow any arguments (i.e. a URL).

                  此代碼打開一個打印對話框.但是,在 kiosk 模式下,打印對話框?qū)⒈焕@過,頁面將自動打印到默認(rèn)打印機(jī).

                  This code opens a print dialog. However, in kiosk mode, the print dialog will be bypassed, and the page will be automatically printed to the default printer.

                  現(xiàn)在您提到了一個 PDF,并且很有可能是您通過 PHP 生成它(如果您正在打印發(fā)布/生成的文件),您可能會想哦,我不能在 PDF 中放入 HTML 來執(zhí)行 javascript".您不需要!要解決打印正確頁面的問題,方法如下:

                  Now you mentioned a PDF, and chances are, your generating it via PHP (if you are printing issued/generated files), your probably thinking "oh, well I can't put HTML in the PDF to execute the javascript". You don't need to! To solve the issue of printing the correct page, here's how:

                  將以下內(nèi)容插入到用戶發(fā)送到的 HTML/PHP 頁面中(對于此解決方案,用戶不需要訪問 .pdf),在 ; 登陸/成功頁面:

                  Insert the following into an HTML/PHP page that the user is sent to (for this solution, the user does not need to visit the .pdf), in the <head> of the landing/success page:

                  <link rel="alternate" media="print" href="LINK TO PDF FILE">
                  

                  如果你的頁面中有上面的代碼,當(dāng)你執(zhí)行window.print();時,它會打印上面指定的頁面.如果您不在本地保存 PDF,您可以將它放在一個臨時目錄中,該目錄以某種方式(超出本問題的范圍)按基于時間或基于操作的計(jì)劃清除,以防止磁盤空間增加.

                  If you have the above code in your page, when you execute window.print();, it will print the page specified above. If you don't save the PDF locally, you can put it in a temporary directory that is somehow (out of the scope of this question) cleared on a time based or action based schedule, to prevent disk space buildup.

                  請記住以下幾點(diǎn):

                  • 信息亭模式?jīng)]有退出按鈕.要退出,請按 ALT + F4.
                  • 在 kiosk 模式下打印時,您需要 --kiosk AND --kiosk-printing.打印參數(shù)需要 --kiosk 參數(shù).
                  • 在自助服務(wù)終端模式下打印時,打印對話框出現(xiàn)然后突然消失是正常.如果沒有高級窗口分層等,就無法防止這種情況發(fā)生.
                  • Kiosk mode doesn't have an exit button. To exit, press ALT + F4.
                  • When printing in kiosk mode, you need both --kiosk AND --kiosk-printing. The printing argument requires the --kiosk argument.
                  • When printing in kiosk mode, it is normal for the print dialog to appear and then suddenly disappear. It can't be prevented without advanced window layering and whatnot.

                  我確信其他瀏覽器也有類似的功能來繞過打印對話框,但是,我發(fā)現(xiàn)谷歌瀏覽器在這種功能中效果最好.如果您在 Linux 機(jī)器上,Google 有一個 .deb 文件,您可以使用該命令在 Linux 上安裝 Google Chrome,使用命令 sudo dpkg -i(包/下載的 .deb 文件路徑).Chromium -- 可能 -- 支持這種功能.據(jù)我所知,應(yīng)該.

                  I'm sure that other browsers have similar functionality to bypass the print dialog, however, I have found that Google Chrome works best in this kind of functionality. If your on a Linux machine, Google has a .deb file that you can install Google Chrome on Linux with, by using the command sudo dpkg -i (package / downloaded .deb file path). Chromium --might-- support this kind of functionality. As far as I know, it should.

                  如果您需要其他幫助,請?jiān)谙旅娴脑u論中留下您的問題,我會盡快回復(fù).

                  If you need additional help, leave your question in the comments below, I'll respond ASAP.

                  我希望我有所幫助.如果我這樣做了,請隨時給我一張你左邊的綠色支票.;)

                  I hope I helped. If I did, feel free to give me a green check to your left. ;)

                  這篇關(guān)于POS:讓網(wǎng)站直接打印到定義的本地打印機(jī)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)

                    <tbody id='ETYlT'></tbody>
                2. <small id='ETYlT'></small><noframes id='ETYlT'>

                  1. <tfoot id='ETYlT'></tfoot>

                          <legend id='ETYlT'><style id='ETYlT'><dir id='ETYlT'><q id='ETYlT'></q></dir></style></legend>
                          • <bdo id='ETYlT'></bdo><ul id='ETYlT'></ul>
                            <i id='ETYlT'><tr id='ETYlT'><dt id='ETYlT'><q id='ETYlT'><span id='ETYlT'><b id='ETYlT'><form id='ETYlT'><ins id='ETYlT'></ins><ul id='ETYlT'></ul><sub id='ETYlT'></sub></form><legend id='ETYlT'></legend><bdo id='ETYlT'><pre id='ETYlT'><center id='ETYlT'></center></pre></bdo></b><th id='ETYlT'></th></span></q></dt></tr></i><div class="5fqpakt" id='ETYlT'><tfoot id='ETYlT'></tfoot><dl id='ETYlT'><fieldset id='ETYlT'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 希望影视-高清影视vip热播电影电视剧免费在线抢先看 | 盐城网络公司_盐城网站优化_盐城网站建设_盐城市启晨网络科技有限公司 | 滁州高低温冲击试验箱厂家_安徽高低温试验箱价格|安徽希尔伯特 | 钢木实验台-全钢实验台-化验室通风柜-实验室装修厂家-杭州博扬实验设备 | 【甲方装饰】合肥工装公司-合肥装修设计公司,专业从事安徽办公室、店面、售楼部、餐饮店、厂房装修设计服务 | AR开发公司_AR增强现实_AR工业_AR巡检|上海集英科技 | 高低温试验房-深圳高低温湿热箱-小型高低温冲击试验箱-爱佩试验设备 | 仿真茅草_人造茅草瓦价格_仿真茅草厂家_仿真茅草供应-深圳市科佰工贸有限公司 | 海日牌清洗剂-打造带电清洗剂、工业清洗剂等清洗剂国内一线品牌 海外整合营销-独立站营销-社交媒体运营_广州甲壳虫跨境网络服务 | 我爱古诗词_古诗词名句赏析学习平台| _网名词典_网名大全_qq网名_情侣网名_个性网名 | 智慧旅游_智慧景区_微景通-智慧旅游景区解决方案提供商 | 石英砂矿石色选机_履带辣椒色选机_X光异物检测机-合肥幼狮光电科技 | 实验室隔膜泵-无油防腐蚀隔膜泵-耐腐蚀隔膜真空泵-杭州景程仪器 电杆荷载挠度测试仪-电杆荷载位移-管桩测试仪-北京绿野创能机电设备有限公司 | 郑州律师咨询-郑州律师事务所_河南锦盾律师事务所 | 400电话_400电话申请_888元包年_400电话办理服务中心_400VIP网 | ERP企业管理系统永久免费版_在线ERP系统_OA办公_云版软件官网 | 检验科改造施工_DSA手术室净化_导管室装修_成都特殊科室建设厂家_医疗净化工程公司_四川华锐 | 不干胶标签-不干胶贴纸-不干胶标签定制-不干胶标签印刷厂-弗雷曼纸业(苏州)有限公司 | 润东方环保空调,冷风机,厂房车间降温设备-20年深圳环保空调生产厂家 | 北京自然绿环境科技发展有限公司专业生产【洗车机_加油站洗车机-全自动洗车机】 | ET3000双钳形接地电阻测试仪_ZSR10A直流_SXJS-IV智能_SX-9000全自动油介质损耗测试仪-上海康登 | 范秘书_懂你的范文小秘书 | 阜阳在线-阜阳综合门户| 压砖机_电动螺旋压力机_粉末成型压力机_郑州华隆机械tel_0371-60121717 | 预制直埋蒸汽保温管-直埋管道-聚氨酯发泡保温管厂家 - 唐山市吉祥保温工贸有限公司 | 电渗析,废酸回收,双极膜-山东天维膜技术有限公司 | 电动葫芦-河北悍象起重机械有限公司 | 宁波普瑞思邻苯二甲酸盐检测仪,ROHS2.0检测设备,ROHS2.0测试仪厂家 | 二维运动混料机,加热型混料机,干粉混料机-南京腾阳干燥设备厂 | 泰来华顿液氮罐,美国MVE液氮罐,自增压液氮罐,定制液氮生物容器,进口杜瓦瓶-上海京灿精密机械有限公司 | 网络推广公司_网络营销方案策划_企业网络推广外包平台-上海澜推网络 | 大型多片锯,圆木多片锯,方木多片锯,板材多片锯-祥富机械有限公司 | 涡轮流量计_LWGY智能气体液体电池供电计量表-金湖凯铭仪表有限公司 | 粉末冶金注射成型厂家|MIM厂家|粉末冶金齿轮|MIM零件-深圳市新泰兴精密科技 | YT保温材料_YT无机保温砂浆_外墙保温材料_南阳银通节能建材高新技术开发有限公司 | 合肥风管加工厂-安徽螺旋/不锈钢风管-通风管道加工厂家-安徽风之范 | 楼承板设备-楼承板成型机-免浇筑楼承板机器厂家-捡来 | 搜木网 - 木业全产业链交易平台,免费搜货、低价买货! | 艺术生文化课培训|艺术生文化课辅导冲刺-济南启迪学校 | 安德建奇火花机-阿奇夏米尔慢走丝|高维|发那科-北京杰森柏汇 |