LoginSignup
11
9

More than 5 years have passed since last update.

pdfを画像化する

Posted at

tl;dr

convert input.pdf out.png
#=> out-0.png, out-1.png, out-2.png, ... , out-50.png 

準備

ImageMagickとGhostscriptをインストールしている必要がある。

brew install gs imagemagick

unable to load module

こういうエラーでうまくいかない場合は brew upgrade imagemagick するとうまくいくかも。

convert: unable to load module `/usr/local/Cellar/imagemagick/6.8.7-0/lib/ImageMagick//modules-Q16/coders/png.la': file not found @ error/module.c/OpenModule/1276.
convert: no decode delegate for this image format `/var/tmp/magick-32598mzLCfx9T2MVU1' @ error/constitute.c/ReadImage/552.
convert: Postscript delegate failed `a.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/682.
convert: no images defined `b.png' @ error/convert.c/ConvertImageCommand/3127.
11
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
9