[rjb-users] RJB, iText generates blank pdf

Jason Yates jaywhy at gmail.com
Thu Dec 13 13:00:40 EST 2007


> Is anyone else using RJB and iText to fill PDFs successfully?

I have a gem on rubyforge that does this.

http://rubyforge.org/projects/pdf-stamper/

I'd suggest you checkout the lastest and greastest from svn.

svn checkout http://pdf-stamper.rubyforge.org/svn/

require 'pdf/stamper/rjb'

pdf = PDF::Stamper.new('test.pdf')
pdf.text :name, "Jason"
odf.image :photo "photo.jpg"
pdf.save_as "output.pdf"

or for rails

send_data(pdf.to_s, :filename => "output.pdf", :type =>
"application/pdf",:disposition => "inline")

-- 
Jason Yates
jaywhy at gmail.com


More information about the rjb-users mailing list