Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

PHP Script to search PDF files


(!)

37Seconds's Avatar
37Seconds 37Seconds is offline
Junior Member with 17 posts.
THREAD STARTER
 
Join Date: Jan 2007
Experience: Intermediate
20-Mar-2007, 07:07 PM #1
PHP Script to search PDF files
Is there a PHP Script that can search through PDF files in a directory on the webserver using a keyword entered by a user of a website?
jaymanson's Avatar
jaymanson jaymanson is offline
Computer Specs
Senior Member with 199 posts.
 
Join Date: Mar 2007
Location: Christchurch, New Zealand
Experience: Advanced Design/HTML/CSS - Intermediate PHP
21-Mar-2007, 08:34 AM #2
This may or may not be of some use to you:

You will no doubt be aware that you can add a Google search to your site. Click here to set it up! If you make sure your website is the only one under 'sites' and add filetype: pdf as a search refinement, that will do exactly what you are looking for.

Depending on what you need, this may not look professional enough for you, but it works all the same

Jay
37Seconds's Avatar
37Seconds 37Seconds is offline
Junior Member with 17 posts.
THREAD STARTER
 
Join Date: Jan 2007
Experience: Intermediate
25-Mar-2007, 10:35 AM #3
Thanks for the idea Jay, but unforetunately it won't work for us. The site we plan on creating will be an intranet site behind a firewall for department to use, so the Google idea won't work.

The site will be used to search through department procedures that are in PDF format. I figured there would already be a php script that is able to do this that we could implement by creating a website on a server. Unforetunately, I have yet to be able to find one.

Any other ideas?
brendandonhu's Avatar
Member with 14,681 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
25-Mar-2007, 12:49 PM #4
You can convert the PDF document to plain text - take a look at the comments on http://php.net/pdf (there's a function called pdf2string()). You can also run the file through a library like pdftohtml or pdftotext.
jaymanson's Avatar
jaymanson jaymanson is offline
Computer Specs
Senior Member with 199 posts.
 
Join Date: Mar 2007
Location: Christchurch, New Zealand
Experience: Advanced Design/HTML/CSS - Intermediate PHP
25-Mar-2007, 03:19 PM #5
Here's a possibility then :-)

Zoom Search Engine

It's free up to 50 page searching, and then not too much after that. Can't quickly see any free scripts that will search PDFs, but you might find one at Hotscripts. I'm more web designer than developer, so this is where I get a lot of my scripts from and then customise them to my needs
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,625 posts.
 
Join Date: Oct 2006
26-Mar-2007, 12:33 PM #6
Will it search filenames only or inside the actual file?

You can put the filenames in a db than have the search find them.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑