-
Install HyPDF addon with your plan
$ heroku addons:add hypdf:giga
-
Add HyPDF credentials to your local .env file
$ heroku config -s | grep HYPDF_ >> .env
-
Replace
hyperpdfgem byhypdfin Gemfile and do bundle installgem 'hyperpdf' -> gem 'hypdf'
-
Replace
HyperPDFclass byHyPDFin your codeHyperPDF.new(html, options) -> HyPDF.new(html, options)
-
If you use uploading to S3, change your bucket policy
... "Principal": {"AWS": "arn:aws:iam::495273932038:root"} ...
-
Remove HyperPDF add-on
$ heroku addons:remove hyperpdf
Instead of steps 3 and 4 just change api.hyper-pdf.com/pdf url to www.hypdf.com/pdf in your POST request.