Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A rack app for converting HTML to PDF via a HTTP call

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 vendor
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 pdfservice.gemspec
Octocat-spinner-32 test.rb

PDF Service

This is a simple Rack server that accepts web requests posting HTML to be converted into PDF. Uses the wkhtmltopdf binaries.

Instant installation and deploy

  • Clone this: git clone git://
  • Signup for an account at Heroku (better details here)
  • push it to git push heroku master


Once the server is running you need to post a string of html to it and that string will be rendered in WebKit and returned to you as a PDF document.

require 'pdfservice'
client = ''
pdf_content = client.render '<html></html>'

Or, straight from a terminal:

curl -X POST -d '<html></html>' > file.pdf

Patches welcome, forks celebrated.

Copyright (c) 2010 Jack Danger Canty. Released under the MIT License.

Something went wrong with that request. Please try again.