要素をドキュメントウィンドウにドラッグして配置する際、アンカー画像にオブジェクトスタイルを適用したい。
アンカー画像にオブジェクトスタイルを適用して配置するには、InDesign スニペット(idms)で要素を構造に配置(追加)したのちドキュメントウィンドウに要素をドラッグすれば良いのかなと、idmsを作ってみたのですが、idmsでアンカー画像のフレームを内容に合わせる方法が解りません。
scriptで要素(XmlStory)内のアンカー画像のフレーム(Rectangle)を内容に合わせたのち、配置するしかないのでしょうか・・・
現状のidms
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?aid style="50" type="snippet" readerVersion="6.0" featureSet="257" ?>
<?aid SnippetType="XMLElement" ?>
<!-- CS6-->
<Document DOMVersion="8.0">
<!-- ドキュメントにスタイルを作成しておくこと-->
<RootParagraphStyleGroup>
<ParagraphStyle Self="ParagraphStyle/段落スタイル 1" Name="段落スタイル 1" />
<ParagraphStyle Self="ParagraphStyle/段落スタイル 2" Name="段落スタイル 2" />
</RootParagraphStyleGroup>
<RootObjectStyleGroup>
<ObjectStyle Self="ObjectStyle/オブジェクトスタイル1" Name="オブジェクトスタイル1" />
</RootObjectStyleGroup>
<XMLTag Self="XMLTag/Story" Name="Story" />
<XMLTag Self="XMLTag/Image" Name="Image" />
<XmlStory>
<XMLElement MarkupTag="XMLTag/Story">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/段落スタイル 1">
<XMLElement MarkupTag="XMLTag/Image">
<Rectangle StrokeWeight="0" AppliedObjectStyle="ObjectStyle/オブジェクトスタイル1">
<Image>
<Link LinkResourceURI="file:///test.jpg" />
</Image>
</Rectangle>
</XMLElement>
<Content>一段目</Content>
<Br />
</ParagraphStyleRange>
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/段落スタイル 2">
<Content>二段目</Content>
</ParagraphStyleRange>
</XMLElement>
</XmlStory>
</Document>
メモ帳で作業すると読み込めない場合があるのですが原因が良くわかりません(Dreamweaverでidmsを書いています)。
