escper 1.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/escper.rb +3 -6
- data/lib/escper/version.rb +1 -1
- metadata +2 -1
data/lib/escper.rb
CHANGED
@@ -49,13 +49,10 @@ module Escper
|
|
49
49
|
temp = 0
|
50
50
|
end
|
51
51
|
end
|
52
|
-
result = bits.collect
|
53
|
-
escpos="\x1D\x76\x30\x00#{@x.chr}\x00#{(@y*8).chr}\x00#{ result }"
|
52
|
+
result = bits.collect{ |b| b.chr }.join
|
53
|
+
escpos = "\x1D\x76\x30\x00#{@x.chr}\x00#{(@y*8).chr}\x00#{ result }"
|
54
|
+
escpos.force_encoding('ISO-8859-15')
|
54
55
|
return escpos
|
55
56
|
end
|
56
57
|
end
|
57
58
|
end
|
58
|
-
|
59
|
-
File.open('/dev/usb/lp0','w') do |f|
|
60
|
-
f.write Escper::Image.new('/home/michael3/projects/salor-tec/cigarstore.png').to_s
|
61
|
-
end
|
data/lib/escper/version.rb
CHANGED