使用php在pdf文件中搜索字符串 [英] search for a string in a pdf file using php
本文介绍了使用php在pdf文件中搜索字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想以strstr()
的方式从pdf文件中搜索字符串.但是,当pdf阅读为纯文本时,它将给您带来难以理解的垃圾.我该怎么做?
I want to search a string from a pdf file in a way strstr()
does. But when a pdf is read as plain text, it gives you a non-understandable junk. How do I do it?
也许 pdflib 有一些解决方案,但是我的托管服务提供商没有帮助我安装它.
Perhaps pdflib has some solution, but my hosting provider doesn't help me install it.
推荐答案
您不仅拥有pdflib库,还可以使用 FPDF 或 TCPDF .
You don't only have pdflib library, you can also use FPDF or TCPDF.
关于PHP读取PDF的一篇不错的文章此处.
And one good article about PDF reading with PHP here.
这篇关于使用php在pdf文件中搜索字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文