ImageMagick not converting pdfs anymore in AWS Lambda

后端 未结 4 1445
没有蜡笔的小新
没有蜡笔的小新 2021-02-07 15:41

I\'ve had a AWS Lambda function running on S3 objects for the last 18 months and it died around a month ago after a minor update. I\'ve reverted it but it\'s still broken. I\'ve

4条回答
  •  盖世英雄少女心
    2021-02-07 15:56

    I had the same problem. Two cloud services processing thousands of PDF pages a day failing because of the pdf.la not found error.

    The solution was to switch from Image Magick to GhostScript to convert PDFs to PNGs and then use ImageMagick with PNGs (if needed). This way, IM never has to deal with PDFs and wont need the pdf.la file.

    To use GhostScript on AWS Lambda just upload the gs binary in the function zip file.

提交回复
热议问题