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...
Asked
Active
Viewed 6,773 times
3
-
first GOOGLE result: http://www.webcheatsheet.com/php/reading_clean_text_from_pdf.php – fabrik Mar 10 '11 at 12:27
-
@fabrik I Have editted the question could u pls go thru it again plsss. – OM The Eternity Mar 10 '11 at 12:43
-
Do you like to create some highlight script like Google Books? – fabrik Mar 10 '11 at 12:45
-
@fabrik No, I Just want to find the coordinates of the desired text in file and place an image below it. – OM The Eternity Mar 10 '11 at 12:49
-
Look here, not really PHP but hope it helps: http://stackoverflow.com/questions/668031/how-to-get-the-x-y-coordinates-of-a-point-in-a-pdf/668564#668564 – fabrik Mar 10 '11 at 12:51
1 Answers
2
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.

Community
- 1
- 1

SynerCoder
- 12,493
- 4
- 47
- 78
-
-
certainly ur answer is helpful, but I have changed my question a bit pls have a look – OM The Eternity Mar 10 '11 at 12:40
-
oh snap,, @fabrik my bad,, I now saw your comment. But it is indeed the first google result. :p – SynerCoder Mar 10 '11 at 13:15
-