Andrew McDonough

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

PDF Writer is a library for creating PDFs.

Installation

gem install pdf-writer

Configuration

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

Usage

PDF::Writer.new(:paper

pdf.text “This is some text”, :font_size => 8, :justification => :center pdf.render

Tables


Andrew McDonough

Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.

Follow Andrew on Twitter or Connect on LinkedIn