//test
$picConf = array();
$picConf['image.']['file'] = t3lib_extMgm::extPath($this->extKey).'pi1/test1.pdf';
if(!is_file($picConf['image.']['file'])){
$picConf['image.']['file'] = "";
}
$theImgCode = '';
if(is_file($picConf['image.']['file'])){
$picConf['image.']['file.']['maxW'] = $this->conf['maxW'] ? $this->conf['maxW'] : 300;
$picConf['image.']['file.']['maxH'] = $this->conf['maxH'] ? $this->conf['maxH'] : 600;
$picConf['image.']['file.']['frame'] = 1;
$picConf['image.']['altText'] = '';
$picConf['image.']['titleText'] = '';
$content .= $this->cObj->IMAGE($picConf['image.']);
}
//S1
$document = new Imagick($picConf['image.']['file']);
echo $document->getNumberImages();
//S2
$img_info = exec(t3lib_div::imageMagickCommand('identify', $cur_path));
//echo .*\.pdf[3]
Or global: $GLOBALS[‘TYPO3_CONF_VARS’][‘GFX’][‘im_noFramePrepended’]