如何获得PDF第一页并将其转换为JPG [英] How to get PDF first page and convert it to JPG

查看:120
本文介绍了如何获得PDF第一页并将其转换为JPG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一种方法,使用PHP exec和Image MagicK获取第一个PDF页面并将其转换为JPG?

Theres a way, using PHP exec and Image MagicK, to get the first PDF page and convert it to JPG?

推荐答案

已经有很多关于搜索结果的搜索结果

您可以选择两个重复项:

You have the choice between two duplicates:

  • ImageMagick/Imagick convert PDF to JPG using native PHP API using the PHP IM bindings

使用命令 Imagemagick将pdf转换为png

请注意,要使其正常工作,您需要安装Ghostscript以及ImageMagick。 (我认为情况通常如此。)

Note that for this to work, you need Ghostscript installed along with ImageMagick. (I think this usually is the case.)

这篇关于如何获得PDF第一页并将其转换为JPG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆