Last active
July 17, 2017 02:35
-
-
Save tonykwon/e76f90d1b668616ba291 to your computer and use it in GitHub Desktop.
Extract PDF Pages and save them as images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert some.pdf[15-19] some.png | |
# convert some.pdf[15-19] some.jpg | |
# convert some.pdf[15-19] some.gif | |
# convert -density 200 some.pdf some.png | |
# convert some.pdf -resize 50% some.png | |
$imagick = new Imagick(); | |
$imagick->readImage('myfile.pdf'); | |
$imagick->writeImages('converted.jpg', false); | |
$imagick = new Imagick(); | |
$imagick->readImage('test.pdf[0]'); | |
$imagick->writeImage('page_one.jpg'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment