Fork of https://github.com/kwrdie/heroku-22-buildpack-wkhtmltopdf. Largely rewritten.
Heroku's own heroku-community/apt buildpack allows successful
installation of wkhtmltopdf through an Aptfile. However, it copies those files to /.apt/usr/local/bin, and
does NOT link that directory to PATH, making it less than ideal for portable web apps.
This is a somewhat unnecessary workaround to download wkhtmltopdf to /app/bin/ (this is what Heroku's build
directory ultimately links to, in case you're confused by the source code), and subsequently adds /app/bin/ to PATH
the way the gods intended.
This means, running heroku run bash and then wkhtmltopdf will work. Huzzah!
heroku buildpacks:add diglactic/heroku-buildpack-wkhtmltopdfYou can override the binary URL via an environment variable:
WKHTMLTOPDF_BINARY_URL=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.debWhen changing this variable, you will need to clear the Heroku build cache by running this command locally:
heroku plugins:install heroku-builds
heroku builds:cache:purge© 2022 Diglactic, LLC