最終更新日: 2009年9月25日
しおり情報ファイルの形式(XML)
XML形式
XML形式のしおり情報ファイルの要素と属性値は下記の通りです。
要素一覧
要素
|
位置
|
説明
|
<bookmark-tree>
|
ルート要素
|
|
<bookmark>
|
<bookmark-tree>の子要素
|
しおりアイテムごとの要素。要素のネストでしおりツリーの親子関係を表現する。
|
<bookmark-title>
|
<bookmark>の子要素
|
しおりのタイトル
|
<bookmark>要素の属性
属性
|
値
|
説明
|
expand
|
true|false
|
trueなら子しおりのリストを開く
|
action-type
|
gotor|launch|uri
|
リンクアクションの種類
gotor: PDF内への移動。
external-destinationの指定があれば外部PDFを開く
launch: ファイルを開く
uri: Webリンクを開く
|
destination-type
|
none|xyz|fit|fith|fitv|fitr
|
宛先ページの表示方法
none: 動作なし
xyz: destination-scalingが指定されている場合は固定、指定が無い場合はズーム設定維持
fit: 全体表示
fith: 幅に合わせる
fitv: 高さに合わせる
fitr: ビューに合わせる
|
destination-page-number
|
<number>
|
宛先ページ番号
|
destination-x1
|
<length>
|
destination-typeによって下記の通り値を指定
xyz x1: 左上X座標
y1: 左上Y座標
fith y1: 上端のY座標
fitv x1: 左端のX座標
fitr x1: 左上X座標
y1:左上Y座標
x2:右下X座標
y2:右下Y座標
※単位:mm
|
destination-y1
|
<length>
|
destination-x2
|
<length>
|
destination-y2
|
<length>
|
destination-scaling
|
<percentage>
|
destination-type="xyz"が指定された時に指定する表示倍率
|
external-destination
|
<uri-specification>
|
外部ファイルパス又はurlを指定
|
<bookmark-title>要素の属性
属性
|
値
|
説明
|
font-color
|
<color>
|
フォント色(RGB)
|
font-style
|
normal|italic
|
フォントスタイル
|
font-weight
|
normal|bold
|
フォントの太さ
|
しおりのサンプル
下図のようなしおりを作成しました。しおりの設定されたPDFファイルはここからダウンロードできます。
このPDFのしおり情報をアウトライナー2でXML形式にて出力したものはここからダウンロードできます。
XMLサンプルファイル(bookmark-sample_bm.xml)の内容
<?xml version="1.0"?>
<
bookmark-tree>
<
bookmark expand=
"true" action-type=
"gotor" destination-type=
"xyz" destination-page-number=
"1"destination-x1=
"0mm" destination-y1=
"0mm">
<
bookmark-title color=
"#FF0000" font-style=
"italic" font-weight=
"bold">しおり1</
bookmark-title>
</
bookmark>
<
bookmark expand=
"true" action-type=
"gotor" destination-type=
"xyz" destination-page-number=
"2"destination-x1=
"0mm" destination-y1=
"0mm" destination-scaling=
"50%">
<
bookmark-title color=
"#000000">しおり2 固定倍率50</
bookmark-title>
<
bookmark expand=
"true" action-type=
"gotor" destination-type=
"fith" destination-page-number=
"3"destination-y1=
"0mm">
<
bookmark-title color=
"#000000">しおり2-1 幅に合わせる</
bookmark-title>
<
bookmark expand=
"true" action-type=
"gotor" destination-type=
"xyz" destination-page-number=
"4"destination-x1=
"0mm" destination-y1=
"0mm">
<
bookmark-title color=
"#000000">しおり2-1-1</
bookmark-title>
</
bookmark>
</
bookmark>
</
bookmark>
<
bookmark expand=
"true" action-type=
"gotor" destination-type=
"fitr" destination-page-number=
"5"destination-x1=
"50mm" destination-y1=
"50mm" destination-x2=
"70mm" destination-y2=
"63mm">
<
bookmark-title color=
"#000000">しおり3 ビューに合わせる</
bookmark-title>
</
bookmark>
<
bookmark expand=
"true" action-type=
"gotor" destination-type=
"xyz" destination-page-number=
"1"destination-x1=
"0mm" destination-y1=
"0mm" external-destination=
".\testfile.pdf">
<
bookmark-title color=
"#000000">外部1</
bookmark-title>
</
bookmark>
<
bookmark expand=
"true" action-type=
"uri" destination-type=
"xyz" destination-page-number=
"5"destination-x1=
"0mm" destination-y1=
"0mm" external-destination=
"http://www.antenna.co.jp/">
<
bookmark-title color=
"#000000">URL指定</
bookmark-title>
</
bookmark>
</
bookmark-tree>