problem when trying to convert pdf to jpg
Posted: 2009-01-06T09:32:26-07:00
Hello,
im an imagemagick newbie ... It would be great if somebody could help me out
i try to use magickwand to convert pdfs files to jpg files, i need something thats really fast, i want to use magickwand cause i want to make a multithreading application which can convert multiple pdf files at once
heres the error msg i get:
Fatal error: magickreadimage(): An unknown C API exception occurred [on C source line 392] in C:\xampp\htdocs\starterkit\public\wandtest.php on line 13
heres my source code:
please, i need help, i should probably not mention it , but i need to get this working before the end of the week , if nobody can help me, i will try to rewrite my code and use imagick instead, but if theres a chance to get it working i would prefer if i could use wand and i would be really happy and thankfull
oh before i forget ... i did not fand the latest wand dll for windows, thats why i used the one which can be found here: http://theillustratedlife.com/php-5.2.0 ... q16_st.dll unfortunytly i dunno which version it is, or how old it is
im an imagemagick newbie ... It would be great if somebody could help me out
i try to use magickwand to convert pdfs files to jpg files, i need something thats really fast, i want to use magickwand cause i want to make a multithreading application which can convert multiple pdf files at once
heres the error msg i get:
Fatal error: magickreadimage(): An unknown C API exception occurred [on C source line 392] in C:\xampp\htdocs\starterkit\public\wandtest.php on line 13
heres my source code:
Code: Select all
<?php
$mw = newMagickWand();
$file = 'test.pdf';
if ($in) {
MagickSetSize($mw, 300, 300);
MagickSetResolution($mw, 300, 300);
}
MagickReadImage($mw, $file); // this is line 13 // this line produces the error i get
MagickResetIterator($mw);
MagickSetImageFormat($mw, 'JPG');
MagickSetCompressionQuality($w, 85);
MagickWriteImage($mw, 'test.jpg');
header('Content-Type: image/'.$ext);
MagickEchoImageBlob($mw);
oh before i forget ... i did not fand the latest wand dll for windows, thats why i used the one which can be found here: http://theillustratedlife.com/php-5.2.0 ... q16_st.dll unfortunytly i dunno which version it is, or how old it is