EXO INFO TECH PVT LTD

Views:
 
Category: Others/ Misc
     
 

Presentation Description

Implementation in Codeigniter to fetch MetaData from pdf file. https://www.exoinfotech.com/blog/website/implementation-in-codeigniter-to-fetch-metadata-from-pdf-file/

Comments

Presentation Transcript

slide 1:

EXO INFO TECH PVT LTD WEBSITE DESIGNING WEBSITE DEVELOPMENT DIGITAL MARKETING Implementation in Codeigniter to fetch Metadata from pdf file. WEBSITE DESIGNING COMPANY IN ALLAHABAD | WEBSITE DEVELOPMENT COMPANY IN ALLAHABAD | SOFTWARE DEVELOPMENT COMPANY IN ALLAHABAD | SEO IN ALLAHABAD

slide 2:

2 Step1 :- Create a file ‘PDFInfo.php’ in application/library class PDFInfo public author public title public pages public function loadfilename string file_get_contentsfilename start strposstring “” + 10 length strpossubstrstring start ” this-title ‘Untitled’ if length this-title strip_tagssubstrstring start length this-title this-pdfDecTxtthis-title start strposstring “” + 12 length strpossubstrstring start ” this-author ‘Unknown’ if length this-author strip_tagssubstrstring start length this-author this-pdfDecTxtthis-author if preg_match“/\/N\s+0-9+/” string found this-pages found1 else pos strposstring ‘/Type /Pages ‘ if pos false pos2 strposstring ‘’ pos string substrstring pos pos2 – pos pos strposstring ‘/Count ‘ this-pages int substrstring pos+7

slide 3:

3 data private function pdfDecTxttxt len strlentxt out ” i 0 while ilen if txti ‘\\’ out . chroctdecsubstrtxt i+1 3 i + 4 else out . txti i++ if out0 chr254 enc ‘UTF-16’ else enc mb_detect_encodingout return iconvenc ‘UTF-8’ out Step 2 :- Load library in Codeigniter Controller And Get result . this- load-library‘PDFInfo’ p new PDFInfo p-loadbase_url.’uploads/library/’.row_get-file_name authorp-author titlep-title pagesp-pages Website designing company in Allahabad | Website Development Company In Allahabad | software development company in Allahabad | Seo in Allahabad

authorStream Live Help