Acrobat Javascript - Extract Pages with Different file names
Hi, I have an Action that I have been running and hoping to simplify so it can be shared with others on my team. I have an action that creates a temp file and then extracts pages and gives them a file name in a designated folder. The Action currently has a separate entry for Javascript to extract the five pages and works. I am hoping to get this to one so I can set the output folder as a variable and quickly update this for each member of the team.
this.extractPages({nStart:0, nEnd:1, cPath: "C:/Users/user/Downloads/Folder/Renamed/form name 5.pdf"});this.extractPages({nStart:2, cPath: "C:/Users/user/Downloads/Folder/Renamed/form name 4.pdf"});this.extractPages({nStart:5, cPath: "C:/Users/user/Downloads/Folder/Renamed/form name 3.pdf"});this.extractPages({nStart:6, cPath: "C:/Users/user/Downloads/Folder/Renamed/form name 1.pdf"});this.extractPages({nStart:4, cPath: "C:/Users/user/Downloads/Folder/Renamed/form name 2.pdf"});What I was trying to do was define a variable with the folder name and then call that in the cPath:
var RenamedFolder = C:/Users/user/Downloads/Folder/Renamed/;
this.extractPages({nStart:0, nEnd:1, cPath: RenamedFolder + "form name 2.pdf"});
this.extractPages({nStart:2, cPath: RenamedFolder + "form name 1.pdf"});I am very new to Javascript and am kind of learning as I go. Is this possible? Or is there a better way to simplify this Action?
