Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Batch Rename from Document Contents

Community Beginner ,
May 06, 2020 May 06, 2020

Hi, All

We would like to use Acrobat Pro DC to rename all our invoices and make it easier for our Creditors team to find and service them.

We need to do the following: 

1) Save PDF Invoics received by email or downloaded by FTP into a networked folder

2) Automate opening up each invoice and recognising information such as Invoice Number and Date using OCR

3) Batch rename all PDFs in the folder using the resulting OCR information to create the name in a specified format

 

I've had a look at the Scan and OCR Tool in Acrobat DC Pro, and while it will batch rename files in a folder, it does not seem to be able to do so using information extracted from these files.

 

There is a third-party app called A-PDF that will do this, but we are concerned that it may not be the best solution.

 

Your help would be appreciated!

Thanks

Stephen Kane

TOPICS
Edit and convert PDFs , How to , Scan documents and OCR
6.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
May 08, 2020 May 08, 2020
LATEST

Searching for and Extracting data from a PDF page is on the more advanced side of Acrobat scripting.  Use the "doc.getPageNthWord()" function.  You'll find some post that discuss this function on this forum. 

Here's the reference entry:

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_API_Acro... 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2020 May 06, 2020

This might be possible with an Action that first OCRs the files and then uses a script (assuming the results of the OCR were good, of course), but it can't actually rename a file. It can only save a new copy of it under the new name.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 07, 2020 May 07, 2020

Thank you!

This looks like a good option, as I would recommend they save new files into one folder and then copy them to another.

 

Any pointers on how I could build teh script?

 

I have no scripting experience at all...

Regards

Stephen

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2020 May 06, 2020

I've written many scripts for extracting data from scanned PDFs, so there is no problem with performing this part of your process in Acrobat with a script. But front end (automatically saving PDF email attachments to a network folders) and the back end (renaming the files) require an external tool. 

 

I don't know which of the A-PDF tools you are using, but I don't see a complete solution for what you need. 

If you're email is MS Office, then this process could be automated with an MS Office script. Such a script can "talk" to Acrobat to perform the PDF specific issues.  

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 07, 2020 May 07, 2020

Hi, All

OK, a modification of our requirementsas I have received additional infomation.

 

We would like to use Acrobat Pro DC to rename all our invoices and make it easier for our Creditors team to find and service them.

 

The saving of files to a specific network folder is done manually, so that requirement is removed.

So our requirements are now:

 

1) Automate opening up each invoice and recognising information such as Invoice Number and Date using OCR

2) Batch rename all PDFs in the folder using the resulting OCR information to create the name in a specified format

 

We currently Use A-PDF Rename as follows:

1) Admin opens the app

2) Adim opens the folder in the app, hand-selects all the new invoices that have been added.

3) Runs a macro that allows the app to OCR each invoice and output Invoice Number, Date and Amount as a rename of the original file

4) The app identifies whether the rename has been successful with a green tick, or specifies an error with a red X

 

I've had a look at the Scan and OCR Tool in Acrobat DC Pro, and while it will batch rename files in a folder, it does not seem to be able to do so using information extracted from these files.

 

Is it possible to build a custom tool that might do this for us? If so, can anyone point to the options I could use?

 

Your help would be appreciated!

Thanks

Stephen Kane

 
 

Topics

 
Edit and convert PDFs,How to,Scan documents and OCR
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 08, 2020 May 08, 2020

Yes, a custom "Action Script" can be created to acquire data from the PDF and save it to a new name. I believe this was already covered. The script can save to a new name, but it can't rename the existing file. And it can't delete the original file.  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 08, 2020 May 08, 2020
LATEST

Searching for and Extracting data from a PDF page is on the more advanced side of Acrobat scripting.  Use the "doc.getPageNthWord()" function.  You'll find some post that discuss this function on this forum. 

Here's the reference entry:

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_API_Acro... 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines