3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/asposebarcodejava/BarcodeImage/generatebarcodebycustomimagesize.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
symbology = Rjb::import('com.aspose.barcode.Symbology')
builder = Rjb::import('com.aspose.barcode.BarCodeBuilder').new("1234567890", symbology.Code39Standard)
builder.setAutoSize(false)
builder.setImageHeight(50)
builder.setImageWidth(120)
builder.save(data_dir + "GenerateBarcodeByCustomImageSize.jpg")
puts "Generate Barcode By Custom Image Size, please check the output file."
end
|