3
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Acrobat Pro DCのスクリプトについてのメモ

Last updated at Posted at 2019-01-03

Acrobat Proにはアクションウィザードという仕組みがあって、作業を自動化できるようだ。
さらに、AcrobatにはJavascriptで操作する機能もあるらしい・・・。
3,4ページごとにページを削除するスクリプトが欲しかったので書いた。

delNum = 0;//削除した数を保管
maxPage = this.numPages;//末尾のページ数を保管
for(i = 0; i < maxPage; i++){
    three = (i-2) % 4;//3つ目かを調べる(0の時3つ目)
    isThree = (three == 0);//3つ目か判定
    four = (i-3) % 4;//4つ目かを調べる(0の時4つ目)
    isFour = (four == 0);//4つ目か判定
    if(isThree){//3つ目の時、ページを削除し、削除数を増加
        this.deletePages(i-delNum);
        delNum++;
    }
    if(isFour){//4つ目の時、ページを削除し、削除数を増加
        this.deletePages(i-delNum);
        delNum++;
    }
}

この辺参考にした。

3
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?