You can follow these steps :
Step 1. create a file with the name class.pdf2text.php
Now paste the code below in this file:
Paste code from here
Step 2. In a another file just write the below code:
include('class.pdf2text.php');
$a = new PDF2Text();
$a->setFilename('test_RFP.pdf'); //give the file name with path
$a->decodePDF();
echo $a->output();
I hope this will help you , because when I was testing this code it was not working for some of pdfs.