Answer the question
In order to leave comments, you need to log in
How to get the number of pages in a PDF using PHP and ImageMagick?
So I started to write, and somehow it does not work:
$obPdf = new imagick();
$obPdf->readImage($pdf_path);
echo '<pre>';
print_r($obPdf);
echo '</pre>';
//Выводит пустой объект
$obPdf->clear();
$obPdf->destroy();
Answer the question
In order to leave comments, you need to log in
Found it myself if anyone needs it
$im = new Imagick();
$im->readImage("test1.pdf");
$pages=$im->getIteratorIndex();
print"$pages";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question