projects
/
Printer-Zebra.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9a7993f
)
make destination device optional in ~DG
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 31 Jan 2012 18:41:30 +0000
(19:41 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 31 Jan 2012 18:41:45 +0000
(19:41 +0100)
Windows driver doesn't seem to use destination device as opposed to cups
ZPL2pbm.pl
patch
|
blob
|
history
diff --git
a/ZPL2pbm.pl
b/ZPL2pbm.pl
index
89eead4
..
e87bc97
100755
(executable)
--- a/
ZPL2pbm.pl
+++ b/
ZPL2pbm.pl
@@
-3,13
+3,15
@@
use warnings;
use strict;
use autodie;
-my $file = shift @ARGV || die "usage: $0 dump.zpl";
+# convert Zebra label printer ZPL to pbm image
+
+my $file = shift @ARGV || die "usage: $0 dump.zpl > dump.pbm";
open(my $in, '<', $file);
while(<$in>) {
chomp;
- if ( /~DG(\w
):
(.+)/ ) {
+ if ( /~DG(\w
+:)?
(.+)/ ) {
my ( $name, $t,$w ) = split(/,/,$2,4);
warn "# $_ => [$name] t=$t w=$w\n";