Text-based file searching (txt, html, etc.) is enabled by default.
To enable search in PDFs, however, you need to:
- Install a program called xpdf
- Ensure the config file points to where you installed it
- Ensure that PHP has access to your xpdf directory. Check your open_basedir PHP setting.
- Ensure that PHP can run the "system" function. Check your disable_functions, safe_mode_exec_dir PHP settings.
Install xpdf
Update the config file to point to xpdf
Once you have installed xpdf, you also need to set the correct path it in the file_extractors config file.
- You can find this under the admin directory on the server. i.e. /admin/extra/file_extractors/config.inc.php
- In that directory is a line that looks something like $file_conf['extract_tool']['pdf'] = '/home/kb/xpdf/';
- Make sure that this points to the directory where you installed xpdf. Change it if it doesn't.
Test that it's working
Test to see if xpdf is working by running the following command from the command line:
$ /path_to_xpdf/pdftotext -raw file_read.pdf file_write.txt;