Hypothetical reader, I bet you always wanted to extract the text from a pdf file. Sure there are a few big tech options but let me appeal to your minimalistic side: pdfminer! This is a simple jar that extracts the text from the pdf into a huge string.
What is this good for you might ask. Well, you can extract the code payment from an invoice. How? There you go: invoice =]