Find out page numbers of PDF, Docx, Doc, Ppt, Pptx files with PHP [closed]
I want this functionality in my PHP application: When user upload a document (PDF, DOCX, DOC, PPT, PPTC extensions) then after uploading user get the total number of pages of document. But without using exec() function. Whiteflash It is possible to do some formats right in PHP. The DOCx and PPTx are easy: For Word files: function PageCount_DOCX($file) { $pageCount = 0; $zip = new ZipArchive(); if($zip->open($file) === true) { if(($index = $zip->locateName('docProps/app.xml')) !== false) { $data = $zip->getFromIndex($index); $zip->close(); $xml = new SimpleXMLElement($data); $pageCount = $xml-