我使用 php 和 ghostscript 将 pdf 转换为图像并显示
<?php
if(empty($_GET['page'])) die;
$numPage=$_GET['page'];
header('Content-type:image/jpeg');
system("gs ".
"-dNOPAUSE ".
"-sDEVICE=jpeg ".
"-dFirstPage={$numPage} ".
"-dLastPage={$numPage} ".
"-sOutputFile=%stdout ".
"-dJPEGQ=90 ".
"-r100x100 ".
"-q file.pdf ".
"-c quit");
?>
谢谢你的回答