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

Javascript Sequence to Extract Data to TXT File in Acrobat

Guest
Sep 26, 2019 Sep 26, 2019

Hello Adobe,

 

I can not find a proper javascript solution for creating a sequence in Adobe Acrobat that will extract text into a .txt file; based on certain criteria.

I have over 500 pdfs with images & financial data on them. I need to extract specific values from these pages. Including values such as: Check number, check date, check amount.

I tried the example at: Acrobat Javascript Samples Scripts

This solutions works but returns "ProcDate:" as well as the date and screws up the date to  "2019101/04". Additionally I can't extract all the feilds at once. I altered the varISBN to: ----------->  var reCHKDT=/ProcDate:(.+? )/g  <-------------------

In my PDF I have the below data:

ProcDate: 2019/01/04

AccountNum: 69447885236

CheckAmt: 157.52

SerialNum: 8574

MflmSeqNum: 268245062738

ProcDate: 2019/01/14

AccountNum: 69447885236

CheckAmt: 2,415.36

SerialNum: 8570

MflmSeqNum: 268545187745

I need to extract the values into a text file (or excel table) in a delimited format. The expected output is below:

2019/01/14; 2,415.36; 8570

2019/01/04; 157.52; 8574

2.2K
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
LEGEND ,
Sep 26, 2019 Sep 26, 2019

You'll have to write code/apapt to your needs. You won't find things to copy exactly to your needs. Do you need help understanding the script? Which part? Or do you need help planning the algorithm for the task?

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
Guest
Sep 26, 2019 Sep 26, 2019
Hello, Thanks for replying! Yes, Please - I need help understanding how to write the script properly. I have been at this for hours.
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
LEGEND ,
Sep 27, 2019 Sep 27, 2019
Which bit are you stuck on? We prefer to focus on details, and help you correct your programming errors - so people learn to program, rather than to copy and paste.
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
Guest
Sep 27, 2019 Sep 27, 2019
So I was able to figure out the correct for loop to get the desired output, but now the data is not correlated and it's coming out repeated. ....
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
LEGEND ,
Sep 28, 2019 Sep 28, 2019
Please let us see what you have. And tell us exactly what that specific version does (if you changed it in any way after the error you'll need up to date info). The chances are we'll identify a lot of things wrong. Don't be downhearted, we all have to fix things one at a time.
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 ,
Sep 28, 2019 Sep 28, 2019
LATEST

Check if you are using the correct delimeter separators for a text file or  CSV file.

 

See here:

https://knowledgebase.constantcontact.com/articles/KnowledgeBase/6269-convert-a-text-file-to-an-exce...

 

In the link above , refer to point number 4; it defines to use tabs for text files and use commas for a CSV file to separate and group your data

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