I have read a pdf file and generated a string from it. I would like to search this large string for a name and retrieve it. The name consistently appears between two other recurring texts ("Name: " and “/Accounting”). I would like to perform this action on many PDFs that are different sizes, lengths etc.
PDFString = “Name: Bill/Accounting”
- I want to grab the text between "Name: " and “/Accounting”
- I want to grab the name “Bill”
- This name might change, so the length of the string might change, so I can’t just say "read 5 characters ahead of “Name:”"
- I want to be able to grab this information wherever it may be in the PDFString (Which will be changing lengths)
- The number of pages in the pdf is not consistent
- The number of lines in the pdf is not consistent