phppdffpdf

How to find coordinate of desired text in PDF file using PHP?


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...


Solution

  • 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.