README.md in prawn-rails-1.0.1 vs README.md in prawn-rails-1.1.0

- old
+ new

@@ -1,16 +1,16 @@ # Prawn-Rails [![Gem Version](https://badge.fury.io/rb/prawn-rails.svg)](http://badge.fury.io/rb/prawn-rails) <a href='http://ko-fi.com/A552JBK' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a> -## Install +# Install ```ruby gem 'prawn-rails' ``` Note: `prawn` and `prawn-table` are dependencies of `prawn-rails` so there is no need to mention it in the projects Gemfile unless you want to use a specific version of either of those libraries. -## Usage +# Usage Create a view with `pdf` as format and `prawn` as handler so filename should look like `example.pdf.prawn` It provides a helper called `prawn_document` which builds a PrawnRails::Document with default options. You can override any options as you please. Example: ```ruby @@ -27,16 +27,12 @@ def show @filename = 'my_report.pdf' end ``` -## Built-in Helpers -* *html_strip(html)*: -Removes the html tags from a string +# Default configuration -## Default configuration - Add a `prawn-rails.rb` config to your Rails app under `config/initializers` like this ```ruby PrawnRails.config do |config| config.page_layout = :portrait @@ -57,47 +53,45 @@ pdf.start_new_page # OR pdf.start_new_page size: "A4", page_layout: :portrait ``` -## Examples +# Examples -1. **Hello World** +#### Hello World ```ruby # hello.pdf.prawn prawn_document do |pdf| pdf.text 'Hello World!' end ``` -2. ** Using Active Record ** +#### Using Active Record ```ruby # myproducts.pdf.prawn prawn_document do |pdf| pdf.text 'Current Products are:' pdf.move_down 20 pdf.table @products.collect{|p| [p.name,p.price]} end ``` -3. ** Using Custom options ** +#### Using Custom options ```ruby # landscape.pdf.prawn prawn_document(page_layout: :landscape) do |pdf| pdf.text 'Landscape Page!' end ``` -## Credits +# Credits -Created by Carlos Ortiz - @cortiz - -<a href='http://ko-fi.com/A552JBK' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a> - Maintained by Weston Ganger - @westonganger -Special thanks to @rwilliams, @sigmike, @smber1, @iffyuva +Created by Carlos Ortiz - @cortiz + +<a href='http://ko-fi.com/A552JBK' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a>