From 899015009d735adfec99f91afaa48cb769fdb987 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 31 Jan 2012 19:41:30 +0100 Subject: [PATCH] make destination device optional in ~DG Windows driver doesn't seem to use destination device as opposed to cups --- ZPL2pbm.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ZPL2pbm.pl b/ZPL2pbm.pl index 89eead4..e87bc97 100755 --- 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"; -- 2.20.1