本文介绍了在Google的云功能上使用Poppler(用于pdf2image Python库)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为内部使用pdf2image的python代码部署一个云函数,但是由于没有安装Poppler,它似乎一直崩溃.是否有其他具有pdf2image convert_from_bytes方法的库?还是安装Poppler的方法?

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?

推荐答案

我知道了.我将poppler路径设置为空目录,在stacktrace中读取缺少的文件,在硬盘上查找并复制.

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.

最终完成复制:

  • pdfinfo
  • pdftoppm

现在它就像一个魅力

这篇关于在Google的云功能上使用Poppler(用于pdf2image Python库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 11:35