3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/asposebarcodejava/Barcode/setbarsheight.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
bb = Rjb::import('com.aspose.barcode.BarCodeBuilder').new
bb.setCodeText("1234567")
bb.setSymbologyType(Rjb::import('com.aspose.barcode.Symbology').Code128)
bb.setBarHeight(3.0)
bb.save(data_dir + "barcode3.jpg")
bb.setBarHeight(7.0)
bb.save(data_dir + "barcode7.jpg")
bb.setBarHeight(11.0)
bb.save(data_dir + "barcode11.jpg")
puts "Barcode with different heights has been created successfully."
end
|