Skip to content

commandpostsoft/heroku-buildpack-pdftotext

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heroku Buildpack: pdftotext

A Heroku buildpack that installs PDF command-line utilities from the Poppler PDF rendering library:

  • pdftotext — extract text from PDF files
  • pdftoppm — convert PDF pages to images (PPM, PNG, JPEG)

Loosely based on the Heroku NGINX buildpack.

Usage

Add to a Heroku app:

heroku buildpacks:add https://github.com/[user]/heroku-buildpack-pdftotext

After deployment the binaries are available on $PATH at:

  • app/bin/pdftotext
  • app/bin/pdftoppm

Supported Stacks

Stack Status
heroku-26 Current
heroku-24 Supported

The correct binary is selected at compile time based on the $STACK environment variable set by Heroku.

Building

Pre-compiled binaries live in bin/ and are checked into the repo. They are built inside the corresponding heroku/heroku:NN-build Docker image so the resulting binaries match the runtime stack's glibc.

Requires Docker. Build all currently-supported stacks:

make build

Build a specific stack:

make build-heroku-26

Build every stack including legacy ones:

make build-all

Override the Poppler version:

make build POPPLER_VERSION=26.05.0

Open a shell in the heroku-26 build image for debugging:

make shell

Technical Notes

  • Poppler is built with BUILD_SHARED_LIBS=OFF for static linking.
  • Qt, GLib, Boost, GPGme, OpenJPEG and the C++ bindings are disabled to keep the binary small and avoid runtime dependencies beyond what the Heroku stack provides.
  • Default Poppler version is pinned in scripts/build_pdftotext and the Makefile; bumping requires rebuilding the binaries for each supported stack.

License

MIT — see LICENSE.md.

About

Heroku buildpack for poppler pdftotext utility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 64.4%
  • Makefile 35.6%