Middleman-PDFKit
PDFKit extension for middleman
Installation
Add this line to your application's Gemfile:
gem 'middleman-pdfkit'
And then execute:
$ bundle
Or install it yourself as:
$ gem install middleman-pdfkit
Usage
- Activate pdfkit in your [config.rb]
configure :build do
activate :relative_assets
activate :pdfkit do |p|
# p.filenames = ['test/test_page1', 'test/test_page2']
# p.filenames = {
'test/test_page1' => 'test/test_page1.pdf',
'test/test_page2' => 'test/test_page2.pdf',
}
# p.disable_smart_shrinking = true
# p.quiet = false
# p.page_size = 'A5'
# p.margin_top = 10
# p.margin_right = 10
# p.margin_bottom = 10
# p.margin_left = 10
# p.print_media_type = true
# p.encoding = 'UTF-8'
end
end
- Execute
middleman build
Contributing
- Fork it ( https://github.com/matt-hh/middleman-pdfkit/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request