I'm trying to verify/fix the cause of unknown action "pdfload" from libvips

242 Views Asked by At

I am using a Heroku vips buildpack. I would like to confirm that vips: unknown action "pdfload" means libvips was compiled without poppler being available so I can't open pdfs. Is that true?

1

There are 1 best solutions below

2
On BEST ANSWER

Yes, that's correct. Check the output of configure when you build libvips for details.

libvips has two PDF import operations, one based on poppler and one on PDFium. The poppler one is easy to get working, but has a GPL licence. The PDFium one has a much more liberal licence, but is significantly harder to build.

libvips configure will try for PDFium first, and if that's unavailable, look for poppler.

There's a thing to build PDFium in a form libvips likes here:

https://github.com/jcupitt/docker-builds/tree/master/pdfium

Yet another option is to use neither and install imagemagick instead. libvips will then try to load PDFs via ImageMagick, which will in turn shell out to GhostScript. It's slow, but it might be simpler to get going, and the shelling out largely avoids the GPL issue.