Is it possible to search a string on a PDF file?
I want to search and highlight a string on a PDF file .
If any idea please help me.....

Thanks for advance

You will have to convert it to plain text first, which is going to be a pain in the ass. There are some classes that claim to be able to do it. Open source options probably won't be as reliable as commercial but it has been about a year since I have worked with pdf and php, so things may have changed.

You will have to google it though.

Another option, if you just want to do a word search and highlight that word, check into javascript libraries like maybe a jQuery plugin or something like that.

If you have access to the command line you can use pdftotext:


use system() or exec() functions to convert the pdf contents into text, so you can store it.

This functions will only works on linux OS right?I want to do it on windows XP..Anybody know how to convert a PDF to text file using commandline?

You can use it also on Windows, read the wiki I've linked ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.