Creating Two Dimensional (2D) BarCodes in Ruby

Aspose.BarCode - Creating Two Dimensional (2D) Barcodes

To Create Two Dimensional (2D) Barcodes using Aspose.Barcode Java for Ruby, simply invoke Creating2DBarcode 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


\# Width of each module


\# Height of each module


builder.setCodeText("this is some test code text. \n Second line \n third line.")

\# Save the image to your system and set its image format to Jpeg + "Creating2DBarcode.jpg")

\# Display Status

puts "Created 2D Barcode Successfully."

Download Running Code

Download Creating Two Dimensional (2D) Barcodes (Aspose.BarCode) from any of the below mentioned social coding sites: