I won't be maintaining this repo because of 2 reasons.
- Heroku will stop providing free access to their services. So I won't be able to test the changes.
- I don't get enough time to work on this.
This buildpack downloads and extracts the most recent
wkhtmltopdf binaries and works on heroku-18
and heroku-20
stacks.
- This buildpack downloads wkhtmltopdf v0.12.6-1 for
heroku-20
stack and v0.12.5 forheroku-18
stack. - This buildpack may support future wkhtmltopdf binary releases(not tested yet) through Aptfile.
-
v1.0 (initial release)
- Support for
Cedar-14
,heroku-16
, andheroku-18
- Support for Aptfile
- Support for
-
v2
- Added support for
Heroku-20
- Removed support for
Cedar-14
andheroku-16
as they reached end of life.
- Added support for
- Downloads wkhtmltopdf binaries from wkhtmltopdf.org
- It doesnot add new environment variables or shell scripts.
- Tested on both
heroku-20
andheroku-18
stack images. - Added ability to specify custom or latest wkhtmltopdf package through Aptfile (Not Tested).
Just add the buildpack to your heroku app by executing:
heroku buildpacks:add https://github.com/RohanDebroy/heroku-buildpack-wkhtmltopdf.git
You can also force this buildpack to be the first Heroku process by using the
--index
option:
heroku buildpacks:add --index=1 https://github.com/RohanDebroy/heroku-buildpack-wkhtmltopdf.git
The Aptfile can be included in the parent directory of you app. If you add the latest or custom wkhtmltopdf binary download url to the aptfile as described below then the buildpack can download the version for you and it in to /app/bin folder of heroku.
#filename should be "Aptfile" without quotes.
# you can include links to specific .deb files or .tar.xz
https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
The binaries wkhtmltopdf
and wkhtmltoimage
will be available on /app/bin
,
you can just execute /app/bin/wkhtmltopdf
and /app/bin/wkhtmltoimage
from your app.
- All thanks to heroku-buildpack-apt project.
- Forgive me if I've used your code and forgot to mention you.
MIT