Skip to main content

php

Count PDF pages with php

function getNumPagesInPDF($PDFPath = NULL)
 {
 $stream = fopen($PDFPath, "r");
 $PDFContent = fread ($stream, filesize($PDFPath));