Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add advice about the wkhtmltopdf-binary gem.

  • Loading branch information...
commit 078e81fe6ae90c277a926ebb0e89bc86d4848977 1 parent 07fe82c
Jason Stewart authored
Showing with 24 additions and 12 deletions.
  1. +12 −6 README
  2. +12 −6 README.rdoc
18 README
View
@@ -2,9 +2,9 @@ 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
@@ -23,7 +23,7 @@ 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
@@ -31,14 +31,14 @@ class PDFExample < ApplicationController
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.
@@ -76,6 +76,12 @@ module Ezprint
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
=======
18 README.rdoc
View
@@ -1,9 +1,9 @@
= 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
@@ -22,7 +22,7 @@ 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
@@ -30,14 +30,14 @@ then run "bundle install"
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.
@@ -73,6 +73,12 @@ It's also easy to create your own processor:
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
* Michael Bleigh for writing the awesome princely plugin, which most of the code is reworked from.
Please sign in to comment.
Something went wrong with that request. Please try again.