how to convert pdf url to png ?
Posted: 2010-08-11T01:21:11-07:00
Hi,
I convert my local pdf file pages to png files by this code:
$im = new imagick( $url.'['. $i . ']');
$im->setImageFormat( "png" );
$im->writeImage($thisFile);
this code works only when my pdf file exists on my local (for example $url = "./pdf_files/test.pdf" )
but, if I change it to a url , $url="http://news.um.ac.ir/test.pdf" ,it can not convert pdf url page to png. it reports error (http://news.um.ac.ir/test.pdf is a valid file)
what can I do?
I convert my local pdf file pages to png files by this code:
$im = new imagick( $url.'['. $i . ']');
$im->setImageFormat( "png" );
$im->writeImage($thisFile);
this code works only when my pdf file exists on my local (for example $url = "./pdf_files/test.pdf" )
but, if I change it to a url , $url="http://news.um.ac.ir/test.pdf" ,it can not convert pdf url page to png. it reports error (http://news.um.ac.ir/test.pdf is a valid file)
what can I do?