Skip to content

Amovement/PDFToImages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFToImages

Convert PDF to multiple images.

Preparation before installation

sudo apt install libmagic-dev libmagickwand-dev
Check if pkg-config is able to find the right ImageMagick include and libs:
pkg-config --cflags --libs MagickWand
Then:
export CGO_CFLAGS_ALLOW='-Xpreprocessor'
go get gopkg.in/gographics/imagick.v2/imagick
Now you can run the program

When you run the program, you may encounter the following error:

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:

About

Convert PDF to multiple images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages