This guide will help you install the required dependencies to get started!
For linux users, you can run the following commands on your terminal.
$ sudo apt-get update
$ sudo apt-get install ghostscript
$ sudo apt-get install graphicsmagick
Once everything is installed, the library should work as expected.
For rich people, you can run the following commands on your terminal.
$ brew update
$ brew install gs graphicsmagick
Once everything is installed, the library should work as expected.
For windows users.. open the links and download installers.
- Download Ghostscript 9.521 for Windows: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gs952
- Download GraphicsMagick for Windows: https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick-binaries/
Add the executable directories to the PATH environment variable for Ghostscript and GraphicsMagick:
C:\Program Files\gs\gs****\bin
C:\Program Files\GraphicsMagick-****
For lambda you can add the required libraries using lambda layers. There are prebuilt, community driven layers for both GraphicsMagic and Ghostscript.
Example ARNs are:
arn:aws:lambda:us-east-1:175033217214:layer:graphicsmagick:2
arn:aws:lambda:us-east-1:764866452798:layer:ghostscript:15
You can also build and publish your own layers. A guide how to publish GraphicsMagick
layer can be found here.
Footnotes
-
An error occurred when the Ghostscript version was 9.53 or later. ↩