pdf - 在 Google Cloud Functions 上使用 GraphicsMagick (GM) 操作 PDF 时出现权限错误
问题描述
我在 Google Cloud 上创建了一个函数,该函数在将图像上传到 Google Cloud Storage 后对其进行操作。
该功能适用于我需要支持的几乎所有图像类型,除非我处理 PDF。我正在尝试将 PDF 转换为图像,但出现以下错误:
Failed to resize path/75/ae4d8a49-ea8e-4473-a679-14a372e2afba_rear.pdf. Error: Command failed: identify-im6.q16: not authorized `/tmp/ae4d8a49-ea8e-4473-a679-14a372e2afba_rear.pdf' @ error/constitute.c/ReadImage/412.
谷歌搜索此错误后,我发现与政策有关,并建议编辑policy.xml
文件(https://cromwell-intl.com/open-source/pdf-not-authorized.html)。但是,这在 Google Cloud Function 中似乎是不可能的。
关于如何在 Google Cloud Functions 中操作 PDF 的任何想法?
注意:这可能与谷歌云功能权限问题有关
解决方案
推荐阅读
- c# - 识别对象类型并在运行时将其传递给函数 typeof()
- excel - 在整个列中搜索部分字符串或字符匹配并在另一列上显示结果
- angular - 为什么对前端和后端应用程序使用不同的容器更好?即 net core 3.0 后端和 angular 8 前端
- javascript - 用 this.state 返回一个变量
- oracle - 在 oracle db 中,最好是在列中默认数据还是在插入语句中设置值?
- python - 使用 Python 将 BLOB 图像转换为 PNG、JPG
- python-imaging-library - 尝试使用 PIL 保存 excel 图表时出现 python AttributeError
- python - 在下载 matplotlib 之前我需要下载什么?我收到以下错误
- css - 这是 Safari CSS 转换错误吗?
- manatee.trello - 试图移动卡片