-
-
Save hereswhatidid/53b37b8da16d6f3a9b9b8122690655f3 to your computer and use it in GitHub Desktop.
Generate JPG from PDF with PHP
This file contains 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
<?php | |
$pdfThumb = new imagick(); | |
$pdfThumb->setResolution(10, 10); | |
$pdfThumb->readImage( __DIR__ . '/PDFFile.pdf' . '[0]'); | |
$pdfThumb->setImageFormat('jpg'); | |
$fp = __DIR__ . '/PDFFile.jpg'; | |
$pdfThumb->writeImage($fp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment