Parsing text in a TextBox

New Here ,
Mar 11, 2018 Mar 11, 2018

Copy link to clipboard

Copied

Good Day,

I am hoping I can get some help using JavaScript. I have a 10 page PDF document with multiple fill in boxes for users to fill in on a Ipad using Acrobat Reader DC.

I am currently using Acrobat Pro DC  and in the 1st page, the user copies an Email received from dispatch.  Using a button, I want to take this data and parse out the Invoice #, Physical Address, and telephone number so I can use this variable to fill in the other pages of the PDF. Example of a pasted Email;

Invoice 1234567

Address 23 Main St

              San Marco Ca

              99002

Telephone 901-111-1212

Variable example;

var Invoice = 1234567

var Address =  23 Main St

var City  = San Marco

var State = CA

Var Zip = 99002

Var Phone = 901-111-1212

Thank you.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

110

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Mar 11, 2018 Mar 11, 2018

Copy link to clipboard

Copied

You can split the value by lines (see: JavaScript String split() Method) and then parse each string as necessary (removing the "Telephone " text, for example), and apply each line to a different field. However, I don't think it's going to work on an iPad, but you can try...

Likes

Translate

Translate

Report

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
New Here ,
Mar 11, 2018 Mar 11, 2018

Copy link to clipboard

Copied

LATEST

Thank you try67!  Even though you pointed me in the right direction, I was able to use the JS substr function to perform the text extraction.

Likes

Translate

Translate

Report

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