Skip to content
A Ruby client library for the Pdfcrowd HTML to PDF API
Find file
Latest commit 34a9bcf Oct 20, 2013 pdfcrowd dev changed the test URL
Failed to load latest commit information.
lib changed the test URL Oct 20, 2013
.gitignore .gitignore update Mar 2, 2013 updated readme May 19, 2011
makefile updated the clean target Mar 2, 2013
pdfcrowd.gemspec version bump Aug 17, 2013

Pdfcrowd HTML to PDF API client

The Pdfcrowd API lets you easily create PDF from web pages or raw HTML code in your Ruby applications.

To use the API, you need an account on, if you don't have one you can sign up here. This will give you a username and an API key.


The recommended installation method is via RubyGems:

sudo gem install pdfcrowd

Or you can build and install the gem manually:

git clone
cd pdfcrowd-ruby/
make gem
sudo gem install pdfcrowd-*.gem   


(don't forget to use your "username" and "apikey")

require 'pdfcrowd'

    # create an API client instance
    client ="username", "apikey")

    # convert a web page and store the generated PDF into a pdf variable
    pdf = client.convertURI('')

    # convert an HTML string and save the result to a file
    html="<html><body>In-memory HTML.</body></html>"'html.pdf', 'wb') {|f| client.convertHtml(html, f)}

    # convert an HTML file'file.pdf', 'wb') {|f| client.convertFile('/path/to/local/file.html', f)}

rescue Pdfcrowd::Error => why
    print 'FAILED: ', why


API Home:

API Reference:

Something went wrong with that request. Please try again.