Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/domain7/html-to-paginated-pdf
HTML to Paginated PDF
https://github.com/domain7/html-to-paginated-pdf
Last synced: 1 day ago
JSON representation
HTML to Paginated PDF
- Host: GitHub
- URL: https://github.com/domain7/html-to-paginated-pdf
- Owner: domain7
- Created: 2011-04-20T16:35:04.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2010-06-09T15:38:32.000Z (over 14 years ago)
- Last Synced: 2024-12-30T12:45:33.948Z (11 days ago)
- Homepage:
- Size: 202 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
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