简体   繁体   中英

php - PDF of images - get dimensions in pixels of each page

I have a task where I want to extract the dimensions in pixels of each page. The pages of this pdf are all images. I tried to use pdfParser but this does not give the details per page. Is there a way around this?

You can use Imagick

<?php
$im = new Imagick();
$im->readImage( "test.pdf[<< page number>>]" );
?>

https://www.php.net/manual/en/book.imagick.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM