16)画像の配置

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

単純に配置するだけなら下記で十分

set inputFile to "Macintosh HD:test.jpg"
tell application "Adobe InDesign CS2_J"
	tell active document
		tell page 1
			set EPSobj to place inputFile
		end tell
	end tell
end tell

領域を作っておきその領域に配置した後縮小する。

set inputFile to "Macintosh HD:test.jpg"
set X to 10
set Y to 20
set W to 50
set H to 60
set myPer to 70
tell application "Adobe InDesign CS2_J"
	tell active document
		tell page 1
			set myRect to make rectangle at beginning with properties ¬
				{geometric bounds:{Y, X, Y + H, X + W}, stroke weight:0, ¬
				fill color:"None", stroke color:"None"}
				--まずはボックスを作る
			set EPSobj to place inputFile on myRect
			--そのボックスに画像を入れる
			tell EPSobj
				set properties to {vertical scale:myPer, horizontal scale:myPer}
				--画像のサイズを変更する
			end tell
			fit myRect given center content
			--画像をセンターに入れる
		end tell
	end tell
end tell

トラックバック(0)

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

Comments are nofollow setting

コメントする

エントリー一覧

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