Skip to content
shairontoledo edited this page Mar 28, 2011 · 2 revisions

auspost – AusPost 4 State Customer Code

#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 – Aztec Code

#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 – BC412

#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 – Channel Code

#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 – Codablock F

#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 11

#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 128

#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 16K

#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 25

#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 – Italian PharmaCode

#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 39 Extended

#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 39

#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 49

#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 93 Extended

#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 93

#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 One

#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 – Raw DAFT succession for custom 4 state symbologies

#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 – GS1 DataBar Expanded Composite

#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 – GS1 DataBar Expanded Stacked Composite

#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 – GS1 DataBar Expanded Stacked

#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 – GS1 DataBar Expanded

#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 – GS1 DataBar Limited Composite

#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 – GS1 DataBar Limited

#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 – GS1 DataBar Omnidirectional Composite

#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 – GS1 DataBar Omnidirectional

#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 – GS1 DataBar Stacked Composite

#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 – GS1 DataBar Stacked Omnidirectional Composite

#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 – GS1 DataBar Stacked Omnidirectional

#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 – GS1 DataBar Stacked

#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 – GS1 DataBar Truncated Composite

#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 – GS1 DataBar Truncated

#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 – Data Matrix

#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 – EAN-13 Composite

#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 – EAN-13

#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 – GS1-14

#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 – EAN-2 (2 digit addon)

#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 – EAN-5 (5 digit addon)

#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 – EAN-8 Composite

#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 – EAN-8

#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 – Flattermarken

#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 – GS1-128 Composite

#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 – GS1-128

#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 – GS1 Composite 2D Component

#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 – HIBC Codablock F

#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 – HIBC Code 128

#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 – HIBC Code 39

#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 – HIBC Data Matrix

#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 – HIBC MicroPDF417

#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 – HIBC PDF417

#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 – HIBC QR Code

#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 – Deutsche Post Identcode

#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 – Interleaved 2 of 5 (ITF)

#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 – ISBN

#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 – ISMN

#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 – ISSN

#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 – ITF-14

#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 – Japan Post 4 State Customer Code

#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 – Royal Dutch TPG Post KIX 4-State Barcode

#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 – Deutsche Post Leitcode

#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 – MaxiCode

#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 – MicroPDF417

#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 – MSI Modified Plessey

#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 – United States Postal Service Intelligent Mail

#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 – PDF417

#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 – Two-track Pharmacode

#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 – Pharmaceutical Binary Code

#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 – United States Postal Service PLANET

#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 – Plessey UK

#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 – PosiCode

#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 – United States Postal Service POSTNET

#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 – Pharmazentralnummer (PZN)

#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 – QR Code

#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 – Rationalized Codabar

#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 – Raw bar space succession for custom symbologies

#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 – Royal Mail 4 State Customer Code (RM4SCC)

#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 – SSCC-18

#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 – Miscellaneous symbols

#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 – Telepen

#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 – UPC-A Composite

#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 – UPC-A

#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 – UPC-E Composite

#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 – UPC-E

#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"
Clone this wiki locally