Написана функ. code128 печати
This commit is contained in:
parent
bec3bb4218
commit
fcc2fa4afe
14
printlib.php
14
printlib.php
@ -5,6 +5,7 @@ define("ESC", "\x1b");
|
|||||||
define("GS", "\x1d");
|
define("GS", "\x1d");
|
||||||
define("LF", "\x0a");
|
define("LF", "\x0a");
|
||||||
define("PORT", "/dev/usb/lp0");
|
define("PORT", "/dev/usb/lp0");
|
||||||
|
function rawlen($data) {}
|
||||||
function initprint() {
|
function initprint() {
|
||||||
return file_put_contents(PORT, ESC . "@");
|
return file_put_contents(PORT, ESC . "@");
|
||||||
}
|
}
|
||||||
@ -16,7 +17,18 @@ function println($data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function printcode39($data) {}
|
function printcode39($data) {}
|
||||||
function printcode128($data) {}
|
function printcode128($data) {
|
||||||
|
$lp=fopen(PORT, 'w');
|
||||||
|
fwrite($lp, "\x1b@");
|
||||||
|
fwrite($lp, "\x1dh\x50");
|
||||||
|
fwrite($lp, "\x1dH\x02");
|
||||||
|
fwrite($lp, "\x1df\x01");
|
||||||
|
fwrite($lp, "\x1dk\x49");
|
||||||
|
fwrite($lp, rawlen($data))
|
||||||
|
fwrite($lp, $data);
|
||||||
|
fwrite($lp, "\x0a");
|
||||||
|
fclose($lp);
|
||||||
|
}
|
||||||
function printean13($data) {}
|
function printean13($data) {}
|
||||||
function printean8($data) {}
|
function printean8($data) {}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user