Save BarCode Image to Streams in Ruby

Aspose.BarCode - Save Barcode Image to Streams

To Save Barcode Image to Streams using Aspose.Barcode Java for Ruby, simply invoke SaveBarcodeImageToTtreams 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 symbology of the barcode


\# Set code text


\# Initialize ByteArrayOutputStream object

out_stream = Rjb::import('').new

\# Save barcode image, Rjb::import('com.aspose.barcode.BarCodeImageFormat').Jpeg)

\# Display Status.

puts "Save Barcode Image to Streams, please check the output file."

Download Running Code

Download Save Barcode Image to Streams (Aspose.BarCode) from any of the below mentioned social coding sites: