Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
HTML to Paginated PDF
branch: master

This branch is even with alkema:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
views
README
app.rb
config.ru

README

Use case: You need to create a PDF.

Possible Solutions:
1. Do not create a PDF.
2. You still need to create a PDF :( so use HTML and CSS because all content should be HTML.

Controlling a document's page breaks, font rendering and margins is possible using the media type of print with CSS. However, browser's rendering engines do not follow these rules consistently by any means. The result is that printing a web page to PDF from a browser is most often pointless because of the quality of rendering.

In order to take advantage of print CSS declarations this program will take your web page via a URL. It will then respect the print CSS of the page and render it using one rendering engine (WebKit) on one platform (OS X) and return the rendered content as a PDF. This way you can print an HTML page to PDF from any web browser or server-side program.

Requirements:

* OS X
* ruby
* Sinatra gem
* wkpdf gem
* Ruby cocoa
* Connection to the Internets


Something went wrong with that request. Please try again.