For a project I needed to extract some text from a pdf. Although there were already a few packages that could to this, I still created spatie/pdf-to-text because I wanted something that was really easy to use. And also because it's fun creating packages.
Under the hood a utility called pdftotext is used. I provided some instructions in the readme on how to install that.
Here's an example of how to extract text from a pdf using the package:
And that's all there is to it, really.