yakovmeister / pdf2image

A utility for converting pdf to image and base64 format.
MIT License
415 stars 140 forks source link

Lambda #48

Closed brunokunace closed 2 years ago

brunokunace commented 4 years ago

Have way to example with binaries of ghoscript and imagemagick to working with serveless (lambda aws)?

yakovmeister commented 4 years ago

nice idea, I'll add it up if I find some time. Thanks for the thought!

igorgidea commented 4 years ago

Really need to set up this utility work with AWS lambda, any help appreciated! Now i get stuck with graphicsmagick set up part.

winverse commented 3 years ago

same issue

yakovmeister commented 3 years ago

hi @winverse , can you try the solution from this page? https://stackoverflow.com/questions/44729088/how-can-i-install-graphicsmagick-or-imagemagick-on-aws-lambda

rodrigogs commented 3 years ago

hi @winverse , can you try the solution from this page? https://stackoverflow.com/questions/44729088/how-can-i-install-graphicsmagick-or-imagemagick-on-aws-lambda

Gonna try this now. I'll let you know if it works.

rodrigogs commented 3 years ago

Sorry, I have changed my mind about using it inside a lambda environment. Depending on the file size it could create a billing problem. I recommend AWS Batch for possibly high workload jobs instead. For now, I'm just not converting my pdfs anymore. When I come back to this I'll let you know about the approach I choose.

marcesengel commented 2 years ago

Created PR #145 for this.

brianMxBm commented 9 months ago

I don't believe this is working as intended anymore. The layers don't seem to be functioning when added to the lambda (They appear on lambda ), my convert function throws out an error. I've tried packaging up the dependencies with my zip but that still doesn't seem to work. Not sure if GM is working as intended.

"errorMessage": "Could not execute GraphicsMagick/ImageMagick: gm \"convert\" \"-density\" \"72x72\" \"-quality\" \"100\" \"-[0]\" \"-resize\" \"600x600!\" \"-compress\" \"jpeg\" \"./untitled.1.png\" this most likely means the gm/convert binaries can't be found",