PDFmyURL

PDFmyURL is a basic ruby-on-rails view helper for the online web service pdfmyurl.com/. It allows for easy PDF creation from URLs without having to install any conversion tools.

Requirements

The gem has only been tested with Ruby 1.9.2 and Rails 3.0.3 but may well work with other versions of Ruby or Rails.

Installation

gem install pdf-my-url

Example

<%= pdf_my_url 'CBC', 'http://www.cbc.ca/' %>

<%= pdf_my_url 'CBC', 'http://www.cbc.ca/', :filename => 'CBC.pdf' %>

<%= pdf_my_url 'CBC', 'http://www.cbc.ca/', :orientation => :portrait %>

<%= pdf_my_url 'CBC', 'http://www.cbc.ca/', :orientation => :landscape %>

<%= pdf_my_url 'CBC', 'http://www.cbc.ca/', :page => { :height => 200, :width => 200 } %>

<%= pdf_my_url 'CBC', 'http://www.cbc.ca/', :margin => { :top => 10, :left => 5, :right => 5, :bottom => 10 } %>

Copyright © 2010 Kevin Sylvestre. See LICENSE for details.