<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_65563"> <div class="blockcode"> <div id="code_nn6"><ol> <li>function pdf2png($PDF,$Path){</li> <li> if(!extension_loaded('imagick')){</li> <li> return false;</li> <li> }</li> <li> if(!file_exists($PDF)){</li> <li> return false;</li> <li> }</li> <li> $IM = new imagick();</li> <li> $IM->setResolution(120,120);</li> <li> $IM->setCompressionQuality(100);</li> <li> $IM->readImage($PDF);</li> <li> foreach ($IM as $Key => $Var){</li> <li> $Var->setImageFormat('png');</li> <li> $Filename = $Path.'/'.md5($Key.time()).'.png';</li> <li> if($Var->writeImage($Filename) == true){</li> <li> $Return[] = $Filename;</li> <li> }</li> <li> }</li> <li> return $Return;</li> <li>}</li> </ol></div> <em onclick="copycode($('code_nn6'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> 转成, imagick, php</div> <div id="comment_65563" class="cm"> </div> <div id="post_rate_div_65563"></div> <br><br>