Search code examples
google-cloud-functionspoppler

Using Poppler (for pdf2image Python library) on Google's cloud functions


I am trying to deploy a cloud function for my python code that internally uses pdf2image, but it seems to keep crashing because it does not have Poppler installed. Are there any alternative libraries that have the pdf2image convert_from_bytes method? Or a way to install Poppler?


Solution

  • I figured this out. I set the poppler path to an empty directory, read in the stacktrace what file was missing, looked it up on my harddrive and copied it.

    Ended up with copying:

    • pdfinfo
    • pdftoppm

    and now it works like a charm