-
Notifications
You must be signed in to change notification settings - Fork 10
Home
shairontoledo edited this page Mar 27, 2011
·
26 revisions
Now(after rghost version 0.8), you can easily create 32 kinds of barcode in Ruby using RGhost and Barcode Writer in Pure PostScript by Terry Burton together in the same project rghost_barcode.
require 'rghost'
require 'rghost_barcode'
doc=RGhost::Document.new
doc.barcode_code39('1234567', :x => 5, :y=> 10)
After that you can convert the barcode to pdf, png, jpeg, tif and other formats or use it inside the document.
gem install rghost
gem install rghost_barcode
or
gem install rghost_barcode -y
RGhost::Config.barcode_examples.render :pdf, :filename => '/tmp/barcodes.pdf'
All barcodes will be available as the factory method of the class Document prefixed by barcode_. The following grammar is used
Document_instance.barcode_barcodename(code(String), options(Hash) )
doc=RGhost::Document.new
doc.barcode_pdf417 '^453^178^121^239',:columns => 2, :rows=> 10, :text => {:size => 10}
auspost, azteccode, code11, code128, code2of5, code39, code93, datamatrix, ean13, ean2, ean5, ean8, interleaved2of5, isbn, kix, maxicode, msi, onecode, pdf417, pharmacode, plessey, postnet, qrcode, rationalizedcodabar, raw, royalmail, rss14, rssexpanded, rsslimited, symbol, upca and upce.
For more details see Terry Burton page.
- RGhost Barcode RDoc
- RGhost – The easy way to build documents
- Barcode Writer in Pure PostScript options details
Terry Burton for all.