PDF renaming - can't get custom token to pull info correctly
I'll start by apologizing for even asking. I've searched and seen various themes about this process discussed and read all the manual areas about match patterns, and googled, and youtube'd, etc and still can't get it to work. I'm missing the obvious apparently.
I'm trying to rename a PDF based on the name of the person contained within and some date info. I can get it all to work other than the person's name and I think the issue is that when hazel is processing the PDF (which is NOT an OCR'd pdf, but a generated PDF file). When I use the preview function, it has ALL of the words in the PDF listed so I know it sees them, but I can't get Hazel to pull the info I want.
Here is what the data field looks like in the preview window of Hazel:
===========================
Pilot Certificate) issued.
MEDICAL CERTIFICATE THIRD
CLASS
AND STUDENT PILOT CERTIFICATE
3. Last Name First Name Middle Name
JOHNSON
FRED
Robert
4. Social Security Number
============================
I'm wanting to use the names below "3. Last Name First Name MIddle Name" in the new filename of the PDF. But when I do the custom token, I get an error when trying to parse out the name. I'm trying to anchor the custom token to grab the words following "3. Last Name First Name Middle Name" but I'm unsuccessful and thinking that is because it's on a separate line. Because of that, I tried using the custom table function but still can't get it to pull that out.
Can anyone help be navigate this. It should be so easy and I am apparently making it SO HARD.
I'm trying to rename a PDF based on the name of the person contained within and some date info. I can get it all to work other than the person's name and I think the issue is that when hazel is processing the PDF (which is NOT an OCR'd pdf, but a generated PDF file). When I use the preview function, it has ALL of the words in the PDF listed so I know it sees them, but I can't get Hazel to pull the info I want.
Here is what the data field looks like in the preview window of Hazel:
===========================
Pilot Certificate) issued.
MEDICAL CERTIFICATE THIRD
CLASS
AND STUDENT PILOT CERTIFICATE
3. Last Name First Name Middle Name
JOHNSON
FRED
Robert
4. Social Security Number
============================
I'm wanting to use the names below "3. Last Name First Name MIddle Name" in the new filename of the PDF. But when I do the custom token, I get an error when trying to parse out the name. I'm trying to anchor the custom token to grab the words following "3. Last Name First Name Middle Name" but I'm unsuccessful and thinking that is because it's on a separate line. Because of that, I tried using the custom table function but still can't get it to pull that out.
Can anyone help be navigate this. It should be so easy and I am apparently making it SO HARD.