40)PDFのブックマーク作成

| コメント(0) | トラックバック(0)

ウィンドウ=>インタラクティブのブックマークパレットにブックマークを作成します。スクリプトを実行すると下図のような状態になり、PDFを作成するとこのブックマークは生きてきます。

as-indd.jpg

プログラムとしてはhyperlinkオブジェクトをまず作成し、そこにリンク先のページやそのページの開き方の設定をしておきます。出来上がったhyperlinkオブジェクトの情報は見えないのですが、2回目に同じ名前のものを作ろうとするとエラーが出てしまいます。
次にブックマークを作成。それのプロパティに先ほど作成したhyperlinkオブジェクトを入れておくと出来上がりです。
作ったブックマークの中にもう一つブックマークを作ると上図のように入れ子になったブックマークが出来上がります。

tell application "Adobe InDesign CS2_J"
	tell document 1
		--★ここから下でページへのリンクの親メニューを作成できる
		set theDest to make hyperlink page destination with properties ¬
			{destination page:page 5, view setting:fit window}
		set oyaBookMark to make bookmark with properties ¬
			{destination:theDest, name:"567"}
		--★ここから下でページへのリンクを作成できる
		set theDest to make hyperlink page destination with properties ¬
			{destination page:page 5, view setting:fit window}
		make bookmark at end of oyaBookMark with properties ¬
			{destination:theDest, name:"5"}
		--★ここから下でページへのリンクを作成できる
		set theDest to make hyperlink page destination with properties ¬
			{destination page:page 6, view setting:fit window}
		make bookmark at end of oyaBookMark with properties ¬
			{destination:theDest, name:"6"}
		--★ここから下でページへのリンクを作成できる
		set theDest to make hyperlink page destination with properties ¬
			{destination page:page 7, view setting:fit window}
		make bookmark at end of oyaBookMark with properties ¬
			{destination:theDest, name:"7"}
	end tell
end tell

トラックバック(0)

トラックバックURL: http://www.adg7.com/mt/mt-tb.cgi/121

Comments are nofollow setting

コメントする

エントリー一覧

OpenID対応しています OpenIDについて
Powered by Movable Type 7.902.0
漢字イラストロジック-脳トレ京
FREE ONLINE SUDOKU