Please note: This page is imported from my wiki, which hasn't been updated in over 10 years. Some of the formatting was lost during the import. I'll try to get around to fixing it someday.
PDF Writer is a library for creating PDFs.
gem install pdf-writer
In config/environment.rb require ‘pdf/writer’ require ‘pdf/simpletable’ # If you want to be able to draw tables Mime::Type.register ‘application/pdf’, :pdf
pdf.text “This is some text”, :font_size => 8, :justification => :center pdf.render
Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.
Follow Andrew on Twitter or Connect on LinkedIn