lib/zebra/zpl/qrcode.rb in zebra-zpl-1.0.5 vs lib/zebra/zpl/qrcode.rb in zebra-zpl-1.1.0
- old
+ new
@@ -6,11 +6,11 @@
include Printable
class InvalidScaleFactorError < StandardError; end
class InvalidCorrectionLevelError < StandardError; end
- attr_reader :scale_factor, :correction_level
+ attr_reader :scale_factor, :correction_level, :width
def width=(width)
@width = width || 0
end
@@ -24,10 +24,10 @@
@correction_level = value
end
def to_zpl
check_attributes
- "^FW#{rotation}^FO#{x},#{y}^BQN,2,#{scale_factor},,3^FD#{correction_level}A,#{data}^FS"
+ "^FW#{rotation}^FO#{x},#{y}^BY,,10^BQN,2,#{scale_factor},,3^FD#{correction_level}A,#{data}^FS"
end
private
def check_attributes