dmBridge PHP API
DMPDFFile.php
00001 <?php
00002 #
00003 # dmBridge: a data access framework for CONTENTdm(R)
00004 #
00005 # Copyright © 2009, 2010, 2011 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00013 class DMPDFFile extends DMFile {
00014 
00020    public function getNumPages() {
00021       $cmd = sprintf('%s -dNODISPLAY -q -c "(%s) (r) file runpdfbegin pdfpagecount = quit"',
00022             DMConfigIni::getInstance()->getString("dmbridge.ghostscript_path"),
00023             $this->getPathname());
00024       $stdout = shell_exec($cmd);
00025       return (int) trim($stdout);
00026    }
00027 
00028 }
 All Data Structures Functions Variables