These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Applying Javascript to Extracted Pages

michaelthopkins
Registered: Feb 11 2008
Posts: 13

I am sure this will turn out to be something simple, but I don't know what term I should be looking for.

I have a javascript where after I input infromation in a dialog box the javascript will extract the pages within the defined range through the extractPages function. Then I have the rest of the javascript insert textboxes and the information inputted by the user. I want these actions to apply to the extracted pages and not to the original PDF. When I run the javascript it applies all the actions after the extractpages function to the original PDF and not the newly extracted pages.

How do I focus the javascript to the newly extracted pages without first saving the newly extracted pages?

Thanks in advance...

Mike

My Product Information:
Acrobat Pro Extended 9.1.3, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
If cPath is not defined, extractPages returns a Document object pointing to the extracted pages, which you can in turn use further in your script.
If you do specify cPath then I think you will need to open the file using openDoc and then use the Document object it returns.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

michaelthopkins
Registered: Feb 11 2008
Posts: 13
try67:

Thanks. after looking at your post I realized I failed to set the document object as a variable so the code wasn't applying to the newly extracted pages.

Thanks!