在amazon elasticbeanstalk上安装pdf2text

I've downloaded and installed the binary from

http://mac.softpedia.com/get/Word-Processing/pdftotext-Installer-Package.shtml#download

it gets installed to /usr/local/bin/pdftotext and it works fine locally.

and in php I execute the following command to make it work.

$cmd = "pdftotext -f $page -l $page pdf/$name abc.txt"; 
$r = exec($cmd,$res);

How can I ensure that it works on elastic beanstalk, what measures do I need to take to make it work there.

Can I just upload the binary with my scripts and make it work there?

Assuming you already have an Elastic Beanstalk environment up and running I suggest you'd manually login to the EC2 server and install pdftotext manually there. If this works nicely with your application you'll need to ensure pdftotext is installed automatically by Elastic Beanstalk when it is launching new servers. You see, Elastic Beanstalk takes charge over server provisioning, meaning it will take web servers up and down as it see fit. Therefore, if you install pdftotext on your ec2 server manually it will no be installed when the Elastic Beanstalk launches a new server.
Two ways around this:
1. ensure pdftotext is installed every time a new server is launched
2. create an AMIwith pdftotext and ensure Elastic Beanstalk uses that when it launches a new server

#1 is trickier and involves scripting. docmentation isn't friendly. see here.
#2 is the easy way and only require that you setup an AMI (snap shot). see here