Zebra Printing

Allows to print ZPL to a network connected Zebra printer.

什麼是Zebra Printing?

Zebra Printing是由Daniel Nitz開發的Chrome擴展程式,該擴展的主要功能是“Allows to print ZPL to a network connected Zebra printer.”。

擴展截圖

screenshot
screenshot

下載Zebra Printing擴展crx文件

下載Zebra Printing擴展crx格式的文件,手動將Chrome擴充功能安裝到瀏覽器中,也可以將crx文件分享給朋友,輕鬆安裝Chrome擴充功能。

擴展使用說明

                        NOTE: This is an extension useful for developers who want to simply print ZPL labels directly from their web apps.

Most Zebra Printers have a HTTP POST endpoint through which ZPL can be directly printed without the need for an installed driver, print dialogs popping up or other locally installed software.

Unfortunately those printers don't set any CORS headers which makes it impossible to use this HTTP endpoint in modern browser-based apps.

This extension circumvents this issue.

In your web app you can now directly print to Zebra printers by using window.postMessage():

window.postMessage({
    type: "zebra_print_label",
    zpl: "^XA^PW400^LL200^FO20,20^A0N,30,30^FDThis is a TEST^FS^XZ",
    url: "http://192.168.37.36/pstprnt"
}, "*");

The Zebra Printing extension will listen to those messages and print the zpl to the url.

type: The extension will only pick up messages where the type is zebra_print_label
zpl: The ZPL string to be printed
url: The URL of the printer
The extension will also post a message to the web page upon loading. This way in your web app you can check if the extension is installed:

window.addEventListener("message", function (event) {
    if (!event.data.ZebraPrintingVersion) {
        return;
    }
    // extension installed, enable print button or whatever...
    console.log(event.data);
});

The event will contain two fields:

ZebraPrintingExtensionId: The extension ID (ndikjdigobmbieacjcgomahigeiobhbo)
ZebraPrintingVersion: The version number of the installed extension                    

擴展基本資訊

名稱 Zebra Printing Zebra Printing
ID ndikjdigobmbieacjcgomahigeiobhbo
官方網址 https://chromewebstore.google.com/detail/zebra-printing/ndikjdigobmbieacjcgomahigeiobhbo
簡介 Allows to print ZPL to a network connected Zebra printer.
檔案大小 219 KB
安裝次數 7,009
目前版本 1.2
更新時間 2020-07-08
上架時間 2019-10-04
評分 5.00/5 共 3 次評分
開發者 Daniel Nitz
電子郵箱 [email protected]
付費類型 free
擴展官網 https://github.com/danielnitz/zebra-printing-chrome-extension
說明頁面URL https://github.com/danielnitz/zebra-printing-chrome-extension/issues
支援的語言 en
manifest.json
{
    "update_url": "https:\/\/clients2.google.com\/service\/update2\/crx",
    "manifest_version": 2,
    "name": "Zebra Printing",
    "version": "1.2",
    "description": "Allows to print ZPL to a network connected Zebra printer.",
    "icons": {
        "128": "zebra128.png"
    },
    "author": "Daniel Nitz",
    "permissions": [
        "",
        "background",
        "activeTab"
    ],
    "content_scripts": [
        {
            "matches": [
                ""
            ],
            "js": [
                "content.js"
            ]
        }
    ],
    "background": {
        "scripts": [
            "background.js"
        ],
        "persistent": false
    },
    "browser_action": [],
    "offline_enabled": true
}