Based on R Ubben's answer, I found the following PHP code to give good results:
function count_pages($pdfname) { $pdftext = file_get_contents($pdfname); $num = preg_match_all("/\/Page\W/", $pdftext, $dummy); return $num; }
\W matches any non-alphanumeric character and excludes things like /Pages , /PageMode , etc.
fuenfundachtzig 08 Oct '09 at 8:47 2009-10-08 08:47
source share