如何使用php创建pdf首页的缩略图,而不使用ghostwrite和imagemagick


How would you create a thumbnail of the first page of a pdf using php but not using ghostwrite and imagemagick

如何使用php创建pdf首页的缩略图,但不使用ghostwrite和imagemagick。我对客户端服务器有限制,因为提供程序不允许安装任何东西。

我想到了两个选项:

将pdf发送到另一个服务器上运行的脚本,该服务器上有pdf阅读库,在那里进行处理,并在响应中返回图像。

另一个想法是上传一个静态编译的ghostscript副本,并将其上传到web主机,并使用system()调用它。虽然主机可能不为您安装和支持软件,但在这些情况下,静态编译的二进制文件已经为我工作了。