Convert PDF to multiple images.
sudo apt install libmagic-dev libmagickwand-dev
pkg-config --cflags --libs MagickWand
export CGO_CFLAGS_ALLOW='-Xpreprocessor'
go get gopkg.in/gographics/imagick.v2/imagick
ImagickException attempt to perform an operation not allowed by the security policy `PDF' @error/constitute.c/IsCoderAuthorized/408
Parsing PDF was disabled in /etc/ImageMagick-x/policy.xml due to its inherent insecurity. The same thing did Ubuntu and perhaps more distros will follow as this is recommendation from security researchers.
You may enable it locally by removing 'PDF' from below line: