Search code examples
djangoherokupoppler

Install poppler onto Heroku Server django


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?


Solution

  • 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.