README.md in wicked_pdf-1.2.2 vs README.md in wicked_pdf-1.3.0

- old
+ new

@@ -83,11 +83,10 @@ <%= yield %> </div> </body> </html> ``` - Using wicked_pdf_helpers with asset pipeline raises `Asset names passed to helpers should not include the "/assets/" prefix.` error. To work around this, you can use `wicked_pdf_asset_base64` with the normal Rails helpers, but be aware that this will base64 encode your content and inline it in the page. This is very quick for small assets, but large ones can take a long time. ```html <!doctype html> <html> @@ -106,10 +105,17 @@ </div> </body> </html> ``` +#### Webpacker usage + +wicked_pdf supports webpack stylesheets and javascript assets. + +Use `wicked_pdf_stylesheet_pack_tag` for stylesheets +Use `wicked_pdf_javascript_pack_tag` for javascripts + #### Asset pipeline usage It is best to precompile assets used in PDF views. This will help avoid issues when it comes to deploying, as Rails serves asset files differently between development and production (`config.assets.compile = false`), which can make it look like your PDFs work in development, but fail to load assets in production. config.assets.precompile += ['blueprint/screen.css', 'pdf.css', 'jquery.ui.datepicker.js', 'pdf.js', ...etc...] @@ -124,9 +130,12 @@ <%= javascript_include_tag "http://code.jquery.com/jquery-1.10.0.min.js" %> <%= javascript_include_tag "http://code.jquery.com/ui/1.10.3/jquery-ui.min.js" %> ``` ### Advanced Usage with all available options + +_NOTE: Certain options are only supported in specific versions of wkhtmltopdf._ + ```ruby class ThingsController < ApplicationController def show respond_to do |format| format.html