1 person found this helpful
Most of this is possible. Here are some pointers:
For A, open the data file and read from it using the importTextData method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.502.html
For B, you would have to check the form field that's populated with the corresponding field in the data field to see if its value is "Y" and extract and save to a new file using the doc.extractPages method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.465.html
This too needs to be run from a privileged context.
For C, this will happen automatically as you loop through the records in the data file using the importTextData method in step A.
For D, use the doc.flattenPages method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.466.html
To make this easier, you can in step B spawn a template to create a new page and flatten it and then extract the page to a new file. See the template.spawn method for more info: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.1216.html
For E, that would be part of the doc.extractPages process, although it will not let you create a new folder, so you'll have to save to an existing one.
Thank you very much George. I will give it a shot and come back if I get stuck!
With the help of a friend, I wrote the code. While it works fine on his windows machine, I get an error on my mac as below:
NotAllowedError: Security settings prevent access to this property or method.
App.openDoc:94:Menu Initiate Salary Disbursement:Exec
I have Adobe Professional 8.1.2. Is this a version problem?
Thanks for your help,