-
Notifications
You must be signed in to change notification settings - Fork 10
82 Barcodes
shairontoledo edited this page Mar 28, 2011
·
2 revisions
#auspost code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_auspost('5956439111ABA 9',{:text=>{:size=>8}, :custinfoenc=>"character", :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#azteccode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_azteccode('This is Aztec Code',{:text=>{:size=>8}, :format=>"full"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#bc412 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_bc412('BC412',{:semi=>true, :text=>{:size=>8}, :enable=>[:text, :checkintext]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#channelcode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_channelcode('3493',{:text=>{:size=>8}, :height=>"0.5", :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#codablockf code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_codablockf('CODABLOCK F 34567890123456789010040digit',{:text=>{:size=>8}, :cols=>8})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code11 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code11('0123456789',{:text=>{:size=>8}, :enable=>[:text, :checkintext, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code128 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code128('Count01234567^FNC2!',{:text=>{:size=>8}, :parsefnc=>true, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code16k code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code16k('Abcd-1234567890-wxyZ',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code2of5 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code2of5('01234567',{:text=>{:size=>8}, :version=>"iata", :enable=>[:text, :checkintext, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code32 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code32('01234567',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code39ext code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code39ext('Code39 Ext!',{:text=>{:size=>8}, :enable=>[:text, :checkintext, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code39 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code39('MULTIPLE ROWS IN CODE 49',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code49 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code49('',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code93ext code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code93ext('Code93 Ext!',{:text=>{:size=>8}, :enable=>[:text, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#code93 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code93('THIS IS CODE 93',{:text=>{:size=>8}, :enable=>[:text, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#codeone code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_codeone('Code One',{:text=>{:size=>8}, :version=>"B"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#daft code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_daft('FATDAFTDAD',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarexpandedcomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarexpandedcomposite('(01)93712345678904(3103)001234|(91)1A2B3C4D5E',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarexpandedstackedcomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarexpandedstackedcomposite('(01)00012345678905(10)ABCDEF|(21)12345678',{:text=>{:size=>8}, :segments=>4})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarexpandedstacked code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarexpandedstacked('(01)95012345678903(3103)000123',{:text=>{:size=>8}, :segments=>4})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarexpanded code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarexpanded('(01)95012345678903(3103)000123',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarlimitedcomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarlimitedcomposite('(01)03512345678907|(21)abcdefghijklmnopqrstuv',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarlimited code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarlimited('(01)15012345678907',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databaromnicomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databaromnicomposite('(01)03612345678904|(11)990102',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databaromni code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databaromni('(01)24012345678905',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarstackedcomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarstackedcomposite('(01)03412345678900|(17)010200',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarstackedomnicomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarstackedomnicomposite('(01)03412345678900|(17)010200',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarstackedomni code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarstackedomni('(01)03612345678904',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databarstacked code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databarstacked('(01)24012345678905',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databartruncatedcomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databartruncatedcomposite('(01)03612345678904|(11)990102',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#databartruncated code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_databartruncated('(01)24012345678905',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#datamatrix code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_datamatrix('This is Data Matrix!',{:columns=>"32", :text=>{:size=>8}, :rows=>"32"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#ean13composite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_ean13composite('331234567890|(99)1234-abcd',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#ean13 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_ean13('977147396801',{:text=>{:size=>8}, :guard=>{:whitespace=>true}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#ean14 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_ean14('(01)04601234567893',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#ean2 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_ean2('05',{:text=>{:size=>8}, :guard=>{:whitespace=>true}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#ean5 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_ean5('90200',{:text=>{:size=>8}, :guard=>{:whitespace=>true}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#ean8composite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_ean8composite('12345670|(21)A12345678',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#ean8 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_ean8('01335583',{:text=>{:size=>8}, :guard=>{:whitespace=>true}, :height=>"0.5", :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#flattermarken code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_flattermarken('12345',{:inkspread=>-0.25})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#gs1_128composite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_gs1_128composite('(00)030123456789012340|(02)13012345678909(37)24(10)1234567ABCDEFG',{:text=>{:size=>8}, :ccversion=>"c"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#gs1_128 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_gs1_128('(01)95012345678903(3103)000123',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#gs1_cc code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_gs1_cc('(01)95012345678903(3103)000123',{:text=>{:size=>8}, :ccversion=>"b", :cccolumns=>"4"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#hibccodablockf code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_hibccodablockf('A123BJC5D6E71',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#hibccode128 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_hibccode128('A123BJC5D6E71',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#hibccode39 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_hibccode39('A123BJC5D6E71',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#hibcdatamatrix code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_hibcdatamatrix('A123BJC5D6E71',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#hibcmicropdf417 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_hibcmicropdf417('A123BJC5D6E71',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#hibcpdf417 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_hibcpdf417('A123BJC5D6E71',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#hibcqrcode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_hibcqrcode('A123BJC5D6E71',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#identcode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_identcode('563102430313',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#interleaved2of5 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_interleaved2of5('2401234567',{:text=>{:size=>8}, :height=>"0.5", :enable=>[:text, :checkintext, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#isbn code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_isbn('978-1-56592-479 54495',{:text=>{:size=>8}, :guard=>{:whitespace=>true}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#ismn code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_ismn('979-0-2600-0043',{:text=>{:size=>8}, :guard=>{:whitespace=>true}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#issn code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_issn('0317-8471 00 05',{:text=>{:size=>8}, :guard=>{:whitespace=>true}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#itf14 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_itf14('04601234567893',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#japanpost code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_japanpost('6540123789-A-K-Z',{:text=>{:size=>8}, :enable=>[:text, :checkintext]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#kix code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_kix('1231FZ13XHS',{:text=>{:size=>8}, :enable=>[:checkintext, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#leitcode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_leitcode('21348075016401',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#maxicode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_maxicode('[\)>^03001^02996152382802^029840^029001^0291Z00004951^029UPSN^02906X610^029159^0291234567^0291/1^029^029Y^029634 ALPHA DR^029PITTSBURGH^029PA^029^004',{:text=>{:size=>8}, :parse=>true, :mode=>"2"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#micropdf417 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_micropdf417('MicroPDF417',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#msi code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_msi('0123456789',{:text=>{:size=>8}, :enable=>[:text, :checkintext, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#onecode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_onecode('0123456709498765432101234567891',{:text=>{:size=>8}, :barcolor=>"FF0000"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#pdf417 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_pdf417('This is PDF417',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#pharmacode2 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_pharmacode2('117480',{:text=>{:size=>8}, :border=>{:color=>"#FF44FF"}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#pharmacode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_pharmacode('117480',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#planet code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_planet('01234567890',{:text=>{:size=>8}, :enable=>[:text, :checkintext]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#plessey code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_plessey('01234ABCD',{:text=>{:size=>8}, :enable=>[:text, :checkintext]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#posicode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_posicode('ABC123',{:text=>{:size=>8}, :parsefnc=>true, :version=>"b", :inkspread=>"-0.5", :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#postnet code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_postnet('01234',{:text=>{:size=>8}, :enable=>[:checkintext, :text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#pzn code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_pzn('123456',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#qrcode code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_qrcode('http://www.terryburton.co.uk/barcodewriter/',{:text=>{:size=>8}, :eclevel=>"M"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#rationalizedCodabar code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_rationalizedCodabar('A0123456789B',{:text=>{:size=>8}, :enable=>[:text, :checkintext, :check]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#raw code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_raw('331132131313411122131311333213114131131221323',{:text=>{:size=>8}, :height=>"1"})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#royalmail code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_royalmail('LE28HS9Z',{:text=>{:size=>8}, :barcolor=>"FF0000", :enable=>[:checkintext, :text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#sscc18 code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_sscc18('(00)006141411234567890',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#symbol code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_symbol('fima',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#telepen code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_telepen('123456',{:numeric=>true, :text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#upcacomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_upcacomposite('01600033610|(99)1234-abcd',{:text=>{:size=>8}})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#upca code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_upca('78858101497',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#upcecomposite code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_upcecomposite('0121230|(15)021231',{:text=>{:size=>8}, :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"
#upce code sample
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_upce('0123456',{:text=>{:size=>8}, :height=>"0.4", :enable=>[:text]})
doc.render :pdf, :resolution => 100, :filename => "my_barcode.pdf"