I am trying to install poppler
on my Heroku server because I am using pdf2image
as a python package. However, I can't just run brew install poppler
like I did on my Mac.
I have tried to add some heroku buildpacks off the internet but with no luck. Anytime pdf2image runs I get this error.
pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?
Is there something I can do on the command line to get poppler installed while keeping heroku/python as my buildpack?
You can install APT packages with an experimental function on Heroku
Steps:
Add the buildpack to Heroku.
heroku buildpacks:add --index 1 heroku-community/apt
Make a file named Aptfile
in your project folder and write poppler-utils
inside.
Is there something I can do on the command line to get poppler installed while keeping
heroku/python
as my buildpack?
Heroku lets you run multiple buildpacks. I haven't tried this buildpack, but I'd recommend adding this buildpack to your existing app:
heroku buildpacks:set heroku/python
heroku buildpacks:add --index 1 https://github.com/survantjames/heroku-buildpack-poppler.git
Then redeploy your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With