Skip to content
Permalink
Browse files

added support for pdf label template to lpr print queue

  • Loading branch information...
RocketMan committed Apr 17, 2019
1 parent cd7f26a commit 00d2f8caf2645857ab21a7c6c2aa5d5794587521
Showing with 11 additions and 1 deletion.
  1. +5 −0 config/config.php
  2. +6 −1 ui/Editor.php
@@ -140,6 +140,11 @@
* escape seq to switch to box drawing mode, if any (empty for UTF-8)
*/
'box_mode' => "",
/**
* output to lpr with the specified pdf label template
* (empty for text/box drawing mode)
*/
'use_template' => "",
],
/**
@@ -1569,7 +1569,12 @@ private function enqueueTag($tag) {
private function printTag($tag) {
$charset = self::$charset[$this->printConfig['charset']];
$output = self::makeLabel($tag, $charset,
$template = $this->printConfig['use_template'];
if($template)
$output = stream_get_contents(popen(__DIR__."/../".
"zk print form=$template tags=$tag", "r"));
else
$output = self::makeLabel($tag, $charset,
$this->printConfig['darkness'],
$this->printConfig['box_mode'],
$this->printConfig['text_mode']);

0 comments on commit 00d2f8c

Please sign in to comment.
You can’t perform that action at this time.