如何使用 PHP 在 PDF 文件中查找所需文本的坐标?

发布于 10-21 03:05 字数 93 浏览 7 评论 0原文

我一直在寻找使用 PHP 查找 PDF 中字符串坐标的方法,我在 GOOGLE 中搜索,也研究了 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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

樱娆2024-10-28 03:05:22

看看这篇文章,它描述了需要做什么,然后向您展示了一些代码和一个用法示例。它从 pdf 文件中获取文本。然后你可以使用 php strpos function 来搜索其中的字符串。

也许这个问题和答案可以帮助你。它是用 Perl 编写的,但可以完成我认为的工作。也许你可以重写php的代码。

  • 如果这有帮助,请标记为答案。

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.

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.

  • Please mark as answer if this helped.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文