pdftotext takes a PDF file and converts the text into a .txt file.
How would I go about getting pdftotext to send the result to a PHP variable instead of a text file?
I’m assuming I have to run exec('pdftotext /path/file.pdf'), but how do I get the result back?
You need to capture stdout/stderr: