Can you help add a split page operation to my batch script?

Below is my batch script to create a bookmark on each page of a pdf.  It takes all the text from the current page and adds it to a variable then checks the variable for the string "SASID:"    It then takes the 10 digits following the "SASID:" string and creates a book mark with the 10 digits as the name.   I am looking to use the extract page method to extract each page to a new file.  Each new file should have the name of the string on that page.  So.  I think I need to add something like this.extractPages({nStart: i,cPath : filename + i + ".pdf"})   Either directly  before or after this line root.createChild(PageText,"this.pageNum=" + i, i); and the filename should be the variable that holds the 10 digit string.  I do beleive "newWord" contains the 10 digit number. Thank you!
var root = this.bookmarkRoot;
var RegularExpression  =  new RegExp(/\n|\r|\t|\s/);
for (var i = 0; i < this.numPages; i++)
        numWords = this.getPageNumWords(i);
        var PageText = "";
var FoundSASID = 0;
for (var j = 0; j < numWords; j++) {
            var word = this.getPageNthWord(i,j,false);
PageText += word;
var strMatches = PageText.match('SASID:');
             if (strMatches != null) {
// Found text SASID: So reset the PageText to nothing and set the FOundSASID to 1
FoundSASID = 1;
PageText = "";
var newWord = PageText.match(RegularExpression);
var foundSpace = PageText.match(' ');
if (newWord != null || foundSpace != null) {
if (FoundSASID==1) {
root.createChild(PageText,"this.pageNum=" + i, i);
FoundSASID = 0;
if (FoundSASID==0) {
PageText = "";

Guess no one wanted to help.
I found a solution. I added this before the root.createChild line. 
this.extractPages({nStart:i, cPath: PageText + ".pdf"});

Similar Messages

Maybe you are looking for

  • Iphone 4 is no longer recognized by my computer

    My iphone 4 isn't recognized by my computer.  When plugging it in, a message on PC states that my phone can't be used due to software not being installed.  It then prompts for a reinstallation of itunes to correct.  However, this doesn't resolve the

  • Blinking Nva pad what is it all about?

    The Nav pad would blink for no apparent reason and keeps on blinking. How do I stop it from blinking. I've got no new message whatsoever . . . And how do you delete multiple text messaging? Like deleting the whole inbox? Salvation entails eternal pow

  • What is the use of MiniApps Tab In PFCG?

    Hi Friends, can any one tell me what is the use of miniapps tab in PFCG. thankx in advance.... regards, kanthi reddy

  • SMSY t.code in Solution Manager 3.2

    I want the steps for using SMSY t.code. In detail i want to configure the SLD using SMSY. URGENT Satinder Lamba

  • Can't update my Shuffle

    I'm having trouble with my Shuffle.. this started happening a few weeks ago. iTunes can't detect it. when i try opening it in My Computer, it freezes, and i can't get the latest iPod updater to work for it. it says "iPod Service Error" or something l