README.md in pdfkit-0.1.1 vs README.md in pdfkit-0.2.0
- old
+ new
@@ -3,12 +3,12 @@
Create PDFs using plain old HTML+CSS. Uses [wkhtmltopdf](http://github.com/antialize/wkhtmltopdf) on the backend which renders HTML using Webkit.
## Installation
1. Install wkhtmltopdf
-## Download the latest binary from http://code.google.com/p/wkhtmltopdf/downloads/list
-## Place the binary somewhere on your path (e.g /usr/local/bin)
+** Download the latest binary from http://code.google.com/p/wkhtmltopdf/downloads/list
+** Place the binary somewhere on your path (e.g /usr/local/bin)
2. Install PDFKit
$ gem install pdfkit
## Usage
@@ -24,11 +24,11 @@
# Save the PDF to a file
File.open('/path/to/save/pdf','w') {|file| file << pdf}
## Middleware
-PDFKit comes with a middleware that allows users to visit any to get a PDF view of any page on your site by appending ?pdf=true to the URL.
+PDFKit comes with a middleware that allows users to visit any to get a PDF view of any page on your site by appending .pdf to the URL.
### Middleware Setup
**Non-Rails Rack apps**
@@ -39,9 +39,15 @@
**Rails apps**
# in application.rb(Rails3) or environment.rb(Rails2)
require 'pdfkit'
config.middleware.use PDFKit::Middleware
+
+**With PDFKit options**
+
+ # options will be passed to PDFKit.new
+ config.middleware.use PDFKit::Middleware, :print_media_type => true
+
## Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.