arr = new Array(
//这里加入页号-------------
1,3,5,7,9
//-------------------------
);

//var re = /.*\/|\.pdf$/ig;
//var filename = this.path.replace(re,"");

var re = /\.pdf$/ig;
var filepath = this.path.replace(re,"") + "_";

var si=0;
var ei=0;
for(var i=0; i < arr.length; i++){
  si = arr[i];
  if(i==arr.length-1){
    ei = this.numPages;
  }else{
    ei = arr[i+1]-1;
  }

  try
  {
    this.extractPages
    ({
      nStart: si-1,
      nEnd: ei-1,
      cPath: filepath + si + ".pdf"
    });
  }
  catch(e)
  {
    console.println("Err:"+e)
  }
}

posted on 2007-11-23 12:01  万一  阅读(4614)  评论(11编辑  收藏  举报