Skip to content

Instantly share code, notes, and snippets.

@ihussain1024
ihussain1024 / index.php
Last active May 26, 2018 09:49
Zpl Barcode printing using PHP
// First create a file called 'text.zpl' in root folder like 'barcodeprinter', and then paste the codes in index.php page
$str_header="Code 128";
$str_footer="Footer Text";
$barcode_data="1234567890";
$content = "^XA^FO230,20^AD^FD".$str_header."^FS^FO230,135^AD^FD".$str_footer."^FS^FO230,40^BY2^BCN,70,Y,N,N^FD".$barcode_data."^XZ";
$fp = fopen($_SERVER['DOCUMENT_ROOT']."/barcodeprinter" . "/text.zpl","wb");
fwrite($fp,$content);
@ihussain1024
ihussain1024 / index.html
Created January 20, 2018 11:38 — forked from Lakerfield/index.html
Print ZPL from browser
<!doctype html>
<html lang="en">
<head>
<title>Print ZPL from browser</title>
</head>
<body>
<h1>Test page for print ZPL from browser!</h1>
<script type="text/javascript">
function printZpl(zpl) {
@ihussain1024
ihussain1024 / BrowserPrint-1.0.4.js
Created January 19, 2018 11:49 — forked from robinsk/BrowserPrint-1.0.4.js
Zebra Browser Print SDK
var BrowserPrint = function() {
function e(e) {
return s + e
}
function n(e, n) {
var i = new XMLHttpRequest;
return "withCredentials" in i ? i.open(e, n, !0) : "undefined" != typeof XDomainRequest ? (i = new XDomainRequest, i.open(e, n)) : i = null, i
}