From: Tore Darell Date: 2008-07-13T01:20:52+09:00 Subject: Re: Barby 0.1 - Ruby barcode generator that doesn't suck (that much) On Jun 13, 8:15 am, Ramon Cahenzli wrote: > Foreero Ivan wrote: > > Please somebody can help me , I'm new with ruby , can anybdy tell me > > how use barby with PDF's documents ? > > It's not the only way, but if you're using Ruby FPDF, I've written a > small extension that can print Barby codes into FPDF-generated PDFs: Also, if you're using PDF::Writer, there's built-in support for that: require 'barby' require 'barby/outputter/pdfwriter_outputter' pdf = PDF::Writer.new barcode = Barby::Code128B.new('humbaba') barcode.annotate_pdf(pdf) The CairoOutputter can generate PDFs from scratch if you for some reason want that: require 'barby/outputter/cairo_outputter' File.open('test.pdf'){|f| f << barcode.to_pdf } In the git repo there's an experimental PrawnOutputter that can both annotate and generate PDFs using Prawn. Tore