我有一个带pdf文件的网址,我需要它转换为jpegs或pngs。任何人都可以帮助我吗?我使用php作为我的网站,我需要这个功能。
答案 0 :(得分:1)
使用imagemagick
http://www.imagemagick.org/script/index。
实施例
$url = "" ; //URl to document ;
$tmp = tmpfile() . ".pdf";
file_put_contents($tmp, file_get_contents($url));
exec("convert -density 300 $tmp image.jpg");