X-Git-Url: http://git.rot13.org/?p=Printer-Zebra.git;a=blobdiff_plain;f=ZPL2pbm.pl;h=692fb66344499c05126ce8524fc96c998728e403;hp=8a7c2b748f337587c2d4fdcd91786b44a98036fb;hb=e3d07b7bcee9e98f7600a9cea357a3a58397f745;hpb=8a149ec83ba4c04d06cf7458f68340e932d7c806 diff --git a/ZPL2pbm.pl b/ZPL2pbm.pl index 8a7c2b7..692fb66 100755 --- a/ZPL2pbm.pl +++ b/ZPL2pbm.pl @@ -35,7 +35,7 @@ while( $line ) { my $out; # ZPL decompress - my $repeat = 1; + my $repeat = 0; foreach my $p ( 0 .. length($data) - 1 ) { my $c = substr($data,$p,1); if ( $c eq ',' ) { @@ -47,10 +47,10 @@ while( $line ) { my $l = ( $w * 2 ) - length($out) % ( $w * 2 ); $l = $w * 2 if $l == 0; warn "# $p ONE-to-EOL $c [$l]\n"; - $out .= "1" x $l; + $out .= "F" x $l; } elsif ( $c eq ':' ) { $out .= length($out) > $w ? substr($out,-$w*2) : "00" x $w; - warn "# $p :\n"; + warn "# $p repeat last line\n"; } elsif ( $c eq 'z' ) { $repeat += 400; } elsif ( $c ge 'g' && $c le 'y' ) {