开发者

Getting individual PDF pages with PHP

开发者 https://www.devze.com 2023-01-23 21:40 出处:网络
I have a PDF document that has 32 pages and need to convert each page to a JPG image. How can I process each 开发者_运维百科PDF page separately instead of a whole document? I\'ve tried doing some rese

I have a PDF document that has 32 pages and need to convert each page to a JPG image. How can I process each 开发者_运维百科PDF page separately instead of a whole document? I've tried doing some research to no luck. I looked at the PHP.net PDF documentation and it doesn't seem like there's a way for me to do what I want to do?


Using ImageMagick will do this for you...

$image = new Imagick("temp/{$filename}.pdf[0]");

Were the array [0] is the page (0 being the first page)


If you have Adobe Acrobat, you can just use it to export the PDF to JPG files, one for each page.

0

精彩评论

暂无评论...
验证码 换一张
取 消