Vote count:
0
I'm getting error!!!
here is my code
error_reporting(1);
ini_set('display_errors', 'on');
require_once "html2pdf/html2pdf.class.php";
$html_content = "<html lang='en'>
<head> <title> Image </title> </head>
<body> <h1> This is test, Now what do you want??? </h1> </body>
</html>";
$html2pdf = new HTML2PDF('P', 'A4');
$html2pdf->WriteHTML($html_content);
$file = $html2pdf->Output('temp.pdf', 'F');
$im = new imagick();
$im->setResolution(300,300);
$im->readimage('temp.pdf[0]');
$im->setImageFormat('jpeg');
$im->writeImage('thumb.jpg');
$im->clear();
$im->destroy();
getting error at this line of code $im->readimage('temp.pdf[0]'); I've search and find this link Convert PDF to JPEG with PHP and ImageMagick but this code is not working at my system using wamp server PHP Version 5.4.16, Apache 2.4.4, wampserver 2.4, windows 7 32 bit and ImageMagick 6.8.6 so what is the problem in my code why it is giving me this error and how to solve this???
asked 43 secs ago
Aucun commentaire:
Enregistrer un commentaire