PDF解析器:pdfparser

https://www.pdfparser.org/documentation PDF解析器

php库解析PDF文件并提取文本等元素。

 

$parser = new \Smalot\PdfParser\Parser();                                                                                                

$pdf = $parser->parseFile('http://zzb.gongshu.gov.cn/upload/file/20100428163443954.pdf');

$text = $pdf->getText();                                                                                                                 

file_put_contents(dirname(__DIR__).'/杭州市拱墅区2009年国民经济和社会发展统计公报', $text, FILE_APPEND);

var_dump($text);exit; 

posted @ 2018-08-10 10:39  bigclould  阅读(1401)  评论(0编辑  收藏  举报