3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/asposebarcodejava/2DBarcode/creating2dbarcode.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
builder = Rjb::import('com.aspose.barcode.BarCodeBuilder').new
builder.setSymbologyType(Rjb::import('com.aspose.barcode.Symbology').Pdf417)
builder.setxDimension(0.6)
builder.setyDimension(1.2)
builder.setCodeText("this is some test code text. \n Second line \n third line.")
builder.save(data_dir + "Creating2DBarcode.jpg")
puts "Created 2D Barcode Successfully."
end
|