e.g. with PdfPageCount available here: http://www.traction-software.co.uk/servertools/pdfpagecount/index.html
su to switch to root user
cp PdfPageCount /var/www
cp test5.pdf /var/www
chmod 777 /var/www/*
<?php
echo "<HTML>";
$file = './test5.pdf';
$command = './PdfPageCount ';
$out = shell_exec($command. $file.' > /dev/null; echo $?' );
echo "Page count: ";
echo $out;
echo "</HTML>";
?>
No comments:
Post a Comment