Gem Version Build Status Maintainability

PuppetPdf

PuppetPdf is a lib that wraps Google Puppeteer pdf generation method to be used with Rails.

Installation

Add this line to your application's Gemfile:

gem 'puppet_pdf'

And then execute:

$ bundle

Or install it yourself as:

$ gem install puppet_pdf

Run this task to install some dependencies:

$ rails puppet_pdf:install_dependencies

Usage

In any part of the application you can call:

PuppetPdf.pdf_from_url(url, options)

to generate a pdf from a url. And:

PuppetPdf.pdf_from_html(html, options)

to generate a pdf from an html.

For now only the output_path option is available to use.

And a pdf of the given url will be generated, and the path to this file is going to be returned.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/puppet_pdf. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the PuppetPdf project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.