全てのしおりのテキストの先頭に番号を付ける
対応バージョン

3.0a 4.0 4.05 5.0 6.0
Windows
×
×
×


Macintosh
×
×
×


ポイント
bObj = bookmarkRoot.children[i];
bObj.name = i + 1 + ":" + bObj.name;
説  明
全てのしおりのテキスト(しおりの名前)に番号を付けるにはしおりの総数を取得します。これはbookmarkRootのchildren配列の数になります。あとは、forを使ってテキストを読み出しforで使用しているループ変数を付加していきます。

サンプル

for (i=0; i<bookmarkRoot.children.length; i++)
{
bObj = bookmarkRoot.children[i];
bObj.name = i + 1 + ":" + bObj.name;
}

 
■サンプルスクリプトを実行する >> Acrobat で動作確認
補足説明
なし