Skip to content

Instantly share code, notes, and snippets.

@redfield
Created July 10, 2013 15:25

Ruby/Rails

  1. Install HyPDF addon with your plan

    $ heroku addons:add hypdf:giga

  2. Add HyPDF credentials to your local .env file

    $ heroku config -s | grep HYPDF_ >> .env

  3. Replace hyperpdf gem by hypdf in Gemfile and do bundle install

    gem 'hyperpdf' -> gem 'hypdf'

  4. Replace HyperPDF class by HyPDF in your code

    HyperPDF.new(html, options) -> HyPDF.new(html, options)

  5. If you use uploading to S3, change your bucket policy

    ... "Principal": {"AWS": "arn:aws:iam::495273932038:root"} ...

  6. Remove HyperPDF add-on

    $ heroku addons:remove hyperpdf

Other languages

Instead of steps 3 and 4 just change api.hyper-pdf.com/pdf url to www.hypdf.com/pdf in your POST request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment