$info = `$cmd`;
$infos = explode("\n", $info);
-
- print_R($infos);exit;
+
+ foreach ($infos as $i){
+
+ if(!preg_match('/^NumberOfPages: ([0-9]+)/', $i, $matches)){
+ continue;
+ }
+
+ $ret = (empty($matches[1])) ? false : $matches[1];
+ break;
+ }
break;
default :