Hiding Code Text that is too Long to Display in Ruby

Aspose.BarCode - Hiding Code Text that is too Long to Display

To Hide Code Text that is too Long to Display using Aspose.Barcode Java for Ruby, simply invoke HideCodeText 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

builder.setSymbologyType(Rjb::import('com.aspose.barcode.Symbology').DataMatrix)

builder.setCodeText("The quick brown fox jumps over the lazy dog\n The quick brown fox jumps over the lazy dog\n");

builder.setCodeLocation(Rjb::import('com.aspose.barcode.CodeLocation').None)

font = Rjb::import('java.awt.Font')

builder.setCodeTextFont(font.new("Serif", font.BOLD + font.ITALIC, 20))

\# Save the image

builder.save(data_dir + "HideCodeText.jpg")

\# Display Status

puts "Hide Code Text Successfully."

Download Running Code

Download Hiding Code Text that is too Long to Display (Aspose.BarCode) from any of the below mentioned social coding sites: