README.md in prawn-rails-1.4.2 vs README.md in prawn-rails-1.5.0
- old
+ new
@@ -1,9 +1,9 @@
# Prawn-Rails
<a href="https://badge.fury.io/rb/prawn-rails" target="_blank"><img height="21" style='border:0px;height:21px;' border='0' src="https://badge.fury.io/rb/prawn-rails.svg" alt="Gem Version"></a>
-<a href='https://github.com/cortiz/prawn-rails/actions' target='_blank'><img src="https://github.com/cortiz/prawn-rails/workflows/Tests/badge.svg" style="max-width:100%;" height='21' style='border:0px;height:21px;' border='0' alt="CI Status"></a>
-<a href='https://rubygems.org/gems/prawn-rails' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://ruby-gem-downloads-badge.herokuapp.com/prawn-rails?label=rubygems&type=total&total_label=downloads&color=brightgreen' border='0' alt='RubyGems Downloads' /></a>
+<a href='https://github.com/cortiz/prawn-rails/actions' target='_blank'><img src="https://github.com/cortiz/prawn-rails/actions/workflows/test.yml/badge.svg?branch=master" style="max-width:100%;" height='21' style='border:0px;height:21px;' border='0' alt="CI Status"></a>
+<a href='https://rubygems.org/gems/prawn-rails' target='_blank'><img height='21' style='border:0px;height:21px;' src='https://img.shields.io/gem/dt/prawn-rails?color=brightgreen&label=Rubygems%20Downloads' border='0' alt='RubyGems Downloads' /></a>
# Install
```ruby
gem 'prawn-rails'
@@ -101,18 +101,32 @@
pdf.text 'Current Products are:'
pdf.move_down 20
pdf.table @products.collect{|p| [p.name,p.price]}
end
```
+
#### Using Custom options
```ruby
# landscape.pdf.prawn
prawn_document(page_layout: :landscape) do |pdf|
pdf.text 'Landscape Page!'
end
```
+
+#### Without using the prawn_document helper
+
+```ruby
+doc = PrawnRails::Document.new(page_layout: :landscape)
+
+doc.text "Page 1"
+doc.start_new_page
+doc.text "Page 2"
+
+pdf_str = doc.render
+```
+
# Credits
Maintained by Weston Ganger - @westonganger