且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AWS Lambda函数-将PDF转换为图像

更新时间:2023-02-01 17:37:34

您可以在以下存储库中找到Lambda的Ghostscript编译版本. 您应该将文件添加到要上传的zip文件中,作为源代码到AWS Lambda.

You can find a compiled version of Ghostscript for Lambda in the following repository. You should add the files to the zip file that you are uploading as the source code to AWS Lambda.

https://github.com/sina-masnadi/lambda-ghostscript

这是一个用于调用Ghostscript函数的npm软件包:

This is an npm package to call Ghostscript functions:

https://github.com/sina-masnadi/node-gs

将已编译的Ghostscript文件复制到项目中并添加npm软件包后,可以使用executablePath('path to ghostscript')函数将软件包指向先前添加的已编译的Ghostscript文件.

After copying the compiled Ghostscript files to your project and adding the npm package, you can use the executablePath('path to ghostscript') function to point the package to the compiled Ghostscript files that you added earlier.