Set Aspect Ratio of BarCodes in Ruby

Aspose.BarCode - Set Aspect Ratio of Barcodes

To Set Aspect Ratio of Barcodes using Aspose.Barcode Java for Ruby, simply invoke SetAspectRatio module. Here you can see example code.

Ruby Code

 data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

\# Instantiate barcode object

builder = Rjb::import('com.aspose.barcode.BarCodeBuilder').new



\# Set Aspect Ratio to 3:2 or 1.5


\# Save the image + "SetAspectRatio.jpg")

\# Display Status

puts "Set Aspect Ratio Successfully."

Download Running Code

Download Set Aspect Ratio of Barcodes (Aspose.BarCode) from any of the below mentioned social coding sites: