如何使用PHP在PDF文件中查找所需文本的坐标? [英] How to find coordinate of desired text in PDF file using PHP?
问题描述
我一直在寻找在PHP中使用PHP在PDF中查找字符串坐标的方法,并且还在SO中查找了许多问题,但没有找到相关的内容,有人可以帮助我找到解决方案.
I have been looking for the way to find the coordinate of string in PDF using PHP I searched in GOOGLE and also looked into many questions in SO, but didnt find something relevant, can someone help me in finding me the solution...
推荐答案
看看此文章,其中描述了需要执行的操作,然后向您展示了一些代码和用法示例.它从pdf文件中获取文本.然后,您可以使用php strpos函数在其中搜索字符串.
Have a look at this article,, it descripes what is needed to do and then shows you some code and a usage example. It gets the text out of a pdf file. Then you can use php strpos function to search for a string in it.
也许这样问题和答案可以为您提供帮助.它在perl中,但是我认为可以完成工作.也许您可以重写php的代码.
Maybe this SO question and answer can help you. It is in perl but does the job I think. Maybe you can rewrite the code for php.
- 如果有帮助,请标记为答案.
这篇关于如何使用PHP在PDF文件中查找所需文本的坐标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!