Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Processing multiple PDFs using Javascript (Acrobat XI on the Mac)

$
0
0

The original specs for this project called for the Javascript to process one large file (the example I was given to use had 104 pages in it).

 

I finished the script, turned it in and was informed that management had changed their minds.  Now they want the script to process a number of small PDFs (each file one or two pages long).  So now the user must either select a single file fifty-two times (or more) or I must find a way to process multiple files using this script.

 

I looked at the API and there seems to be no way to select more than one PDF at a time for processing.  I do not know if that is a security thing or if they are trying to drive us to use Actions.

 

I attempted to set up an action but my script is simply too long (in excess of 2300 lines).  When I go to the Execute Javascript step, open the Settings option and copy the script into the JS editor provided, when I run the action, Acrobat tells me that the script is "too long for this editor."

 

The reason for the long script is that I am going through the document page by page and examining the text for URLs.  Do you know how many ways there are for different writers to express URLs?  Believe me, they are numerous! (grin)

 

I went to preferences and changed my editor to an external editor (UltraEdit for Mac--it does plain text editing).  I then opened up settings and the UE editor did come up, but when I copy/pasted the code from the original script into the temp file created by the Action Wizard using the UE Editor, and then attempted to save the script, I got the eternal beach ball.

 

Do I have a third option for processing a number of PDF files?  Is there something that I am overlooking that will make this script work?

 

Thanks for your time and effort.

 

R,

John


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>