Getting the invoice number from a PDF

Hi there,

I’m storing all my invoices in DEVONthink. When I add them to DT from my accounting software the PDF is called ‘unnamed document’. The invoice number is present as a text after ‘Invoice no.:’ – The file also contain a URL where the last 5 digits are the invoice number.

I’m trying to set up a smart rule that recognizes when it’s one of my invoices – that’s the easy part – but I want DT to rename the PDF to ‘Invoice {invoice no}’.

So my question is: How do I tell DT that either:
1- The invoice no. is right after ‘Invoice no.:’
2- The invoice no. is the last 5 digits of the URL

and then use that information in renaming?

Thanks,
Thomas

Searching in the forum for relevant words (“renaming” and “invoice” comes to mind) might help. Also, searching for “scan text” or “scan name” should turn up useful posts related to this question.

All that is assuming that your PDF contains a text layer, i.e. it’s shown as “PDF+Text” in DT.