README in ezprint-0.3.1 vs README in ezprint-1.0.0
- old
+ new
@@ -1,12 +1,12 @@
Ezprint
=======
Ezprint is a drop in replacement for the princely plugin. It uses PDFKit
-as the backend instead of princexml, possibly saving you millions of
-dollars. I recommend using the Rack middleware component of PDFKit to
-print PDFs in rails, but this plugin makes an easy transition from
+as the backend instead of princexml, possibly saving you millions of
+dollars. I recommend using the Rack middleware component of PDFKit to
+print PDFs in rails, but this plugin makes an easy transition from
prince->PDFKit for those using princely.
Installation
============
@@ -21,26 +21,26 @@
then run "bundle install"
Example
=======
-The examples here are similar to princely, since the
+The examples here are similar to princely, since the
plugin is basically a reworking of the princely source
class PDFExample < ApplicationController
def show
respond_to do |format|
format.html
format.pdf do
- render :pdf => "My Awesome PDF",
+ render :pdf => "My Awesome PDF",
:template => "controller/action.pdf.erb",
:stylesheets => ["application","print"]
:layout => "pdf"
end
end
end
-
+
# Alternatively, you can use make_and_send_pdf to
# render out a PDF for the action without a
# respond_to block.
def pdf
make_and_send_pdf("file_name")
@@ -73,9 +73,15 @@
# Code to return a PDF string from an html string here.
end
end
end
end
+
+Possible Gotchas
+================
+
+If you're getting a "Broken Pipe" error when rendering PDF documents, you may need to
+install the wkhtmltopdf-binary gem or put it in your Gemfile.
Credits
=======