[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(DTPtechNote:1727) [AppleScript][InDesign CS3]jpeg書き出し(メモ)
勉強部屋さんにポストしたメモ
http://www2.rocketbbs.com/11/bbs.cgi?id=thats&mode=pickup&no=591#591
to save_jpeg(my_folder, my_name, page_no)
tell application "Adobe InDesign CS3"
tell JPEG export preference 1
set JPEG Quality to maximum
set Exporting Spread to false
set JPEG Rendering style to baseline encoding
set resolution to 72
set JPEG export range to export range
set Page String to page_no
end tell
export document 1 format JPG to my_folder & my_name & ".jpg"
end tell
end save_jpeg
tell application "Adobe InDesign CS3"
tell document 1
set my_folder to (file path) as Unicode text --ドキュメントのあるフォルダ
repeat with page_no from 1 to (count every page)
tell page page_no
set my_graphic to object reference of item 1 of all graphics
set my_link to item link of my_graphic
set my_name to do shell script "echo " & name of my_link & " | sed -e 's/\\....$//;'" --拡張子3文字のみ対応
my save_jpeg(my_folder, my_name, page_no as Unicode text)
end tell
end repeat
end tell
end tell