Home > OS >  php - PDF of images - get dimensions in pixels of each page
php - PDF of images - get dimensions in pixels of each page

Time:08-08

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?

CodePudding user response:

You can use Imagick

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

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

  • Related