Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

Extract spawned page to folder

$
0
0

Is it possible to Spawn a template page  and then extract it to another folder?

This is what i have so far but I get a range error…

 

 

 

    var t = this.getTemplate("MyTemplate");   

    //var T = t[0];

 

    var XO = t.spawn(this.numPages, true, true);

 

    for (var i=0; i<0; i++) t.spawn(this.numPages, true, true, XO);

 

 

 

this.pageNum++;

 

 

    /* Extract pages to folder */

 

    // Regular expression used to acquire the base name of file

 

    var re = /\.pdf$/i;

 

    // filename is the base name of the file Acrobat is working on

 

    var filename = this.documentFileName.replace(re,"");

 

    try {for (var j = 0; j < this.numPages; j++)

 

            this.extractPages({

 

                nStart: j,

 

                cPath: "/MyComputer/Desktop/MyFolder/"+filename+"_" + j +".pdf"

 

            });        

 

    } catch (e) { console.println("Aborted: " + e) }


Viewing all articles
Browse latest Browse all 73766

Trending Articles



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