Rename PDF with found text that has variable length

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

We receive PDF reports that have consistent text: (* varies by report)

File name is always: L*********
Always contains: Accession: L*********
Always contains: Rcvd: DD-MMM-YYYY

Always contains: FIRSTNAME LASTNAME (Always capitals,But variable length for each)
Is there a way to pull this information out of the file to auto rename as:

Labwork-FIRSTNAME-LASTNAME-DD-MMM-YYYY

Not sure how to find/Match/set token to text that varies in length.

Thanks
squashray
 
Posts: 5
Joined: Fri Aug 10, 2012 11:19 am

Can you give more concrete examples of what **** can be and how it looks in context?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Can you give more concrete examples of what **** can be and how it looks in context?



A filename and accession number example would be:
L200610307

It is always 9 numbers
All of the text I indicated in the first post is consistently identified as editable text in Preview/PDFPen/Expert/Adobe etc so it should be searchable.

I have a screen grab of the top of the PDF layout - but how do I show that here ?.?.?
squashray
 
Posts: 5
Joined: Fri Aug 10, 2012 11:19 am

You'll need to upload the screenshot to a file sharing or image hosting service. If you don't have one you use already, try imgur.com.

If it's always a number and comes after "L", you can do "L(number)". How does it look in the preview?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:You'll need to upload the screenshot to a file sharing or image hosting service. If you don't have one you use already, try imgur.com.

If it's always a number and comes after "L", you can do "L(number)". How does it look in the preview?


Thanks. Here is the link:
[Imgur](https://i.imgur.com/X0bQ5L1.png)


Just so no confusion - I'm unclear how to grab the name text for use as a naming token when it can be different lengths.
ie JOE SMITH
ie SPARKY NOODLESOFT
squashray
 
Posts: 5
Joined: Fri Aug 10, 2012 11:19 am

You can use a pattern like: "Patient: (•firstname) (•lastname)" where the two custom tokens are set to match a word. This may not work for people that have multi-word names so you will have to play with it.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support