biz-Streamマニュアル XMLページレイアウトタグ リファレンス 第3章 テキスト 3.7 複数行横書きテキスト<multi-text>

3.7 複数行横書きテキスト<multi-text>


3.7.1機能説明

複数行を要する横書きのテキストデータを、指定した幅で自動的に折り返して表示したい場合に使用する要素です。



3.7.2属性説明

属性名 指定 説明 指定内容 初期値
name任意名前CDATA
x任意X座標CDATA0
y任意Y座標CDATA0
unit任意単位(Choice)mm / cm / in / px/ ptmm
cell-width必須領域の幅CDATA
cell-height任意領域の高さCDATA
text-align任意テキストの配置(水平方向)(Choice)left / center / rightleft
line-align任意行の配置(垂直方向)(Choice)top / center / bottom / eventop
narrow任意領域にデータが入りきらない場合の圧縮方法(Choice)size / none / resize / justify / fontresizesize
line-space任意行間CDATA0
font-family任意フォント種類(Choice)ライブラリ共通ガイド
6.2.1 横書きフォント』を参照
MSGothic
font-size任意フォントサイズCDATA8
font-style任意フォントスタイル(Choice)PLAIN / BOLD / ITALIC /BOLD-ITALICPLAIN
font-encoding 任意 フォントエンコーディング (Choice) 90ms-RKSJ-H / 90ms-RKSJ-V / 90msp-RKSJ-H / 90msp-RKSJ-V / UniJIS-UTF16-H / UniJIS-UTF16-V フォントごとのデフォルト値
font-color任意フォントの色CDATA0
char-space任意文字間隔CDATA0
border-color任意枠線の色CDATA0
border-width任意枠線の幅CDATA
border-style任意枠線のスタイル(Choice) 「6.2 線<Line>」にある属性説明の「LineStyle属性」を参照 Solid
margin任意領域内の余白(Choice)start:左端余白 /
end:右端余白 /
top:上部余白 /
bottom:下部余白
1pt
1pt
0pt
2pt
section-indent任意ぶら下げインデント(Choice)mm / cm / in / px/ pt0
background-color任意背景の色CDATA
max-length任意表示する最大文字数CDATA※1
text-indent任意1行目インデント(Choice)mm / cm / in / px/ pt0
gaijifont-family任意外字フォント種類(Choice)ライブラリ共通ガイド
6.5 外字フォント』を参照
japanese-
hyphenation
任意日本語の禁則処理の有無(Choice)true / false ※2true
english-
hyphenation
任意英単語の禁則処理の有無(Choice)true / false false
english-
hyphenation-overrange
任意英単語の禁則処理が『true』に設定されている場合、英単語の幅がcell-widthを超えた時の処理方法(Choice)compress:該当行の文字幅を圧縮しcell-widthに合わせる。(Excel出力の場合は圧縮せずcell-widthを超えて出力)
hyphen:文字列をcell-widthに合わせて区切り、文字列の後ろにhyphenを付ける。
compress
flow必須流し込みの有無(Choice)true / falsefalse
  • (注)初期値:出荷時のXMLデフォルト情報(default_values.properties)値を指します。ユーザにより値の変更が行われた場合はこの限りではありません。
  • ※1max-lengthは改行文字も含みますので実際に表示される文字数は指定した数値より少なくなる場合があります。
  • ※2本要素でtrueを設定した時に禁則処理の対象となる文字と各処理内容は、次のとおりです。
禁則処理 処理内容 禁則文字
行頭禁則文字 該当行の文字幅を圧縮し、対象文字を行末におさめます。 、 、 。 。 , , . . ・ ・ ? ? ! ! : ; ゚ ゛ ゙ ゜ ヽ ー ー ) ] } 々 」 』 ) ] } 」 ゞ ゝ ヾ
行末禁則文字 該当行の文字幅を広げて、対象文字を次行から開始します。 ( [ { 「 『 ( [ { 「


3.7.3記述例

multi-text サンプル1

multi-text サンプル1 (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample1.xml multi-text サンプル1』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Name="multi-textSample1" Width="140" Height="60" X="10" Y="10" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <!-- (1)multi-text1 -->

    <multi-text cell-width="30" cell-height="30" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="0" background-color="0,255,255" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">1行目1行目1行目1行目1行目
2行目2行目
3行目
</multi-text>
    <!-- (2)multi-text2 -->

    <multi-text x="40" cell-width="30" cell-height="30" text-align="center" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="0" background-color="192,192,192" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">1行目1行目1行目1行目1行目
2行目2行目
3行目
	</multi-text>
    <!-- (3)multi-text3 -->

    <multi-text x="80" cell-width="30" cell-height="30" text-align="right" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="0" background-color="255,255,0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">1行目1行目1行目1行目1行目
2行目2行目
3行目
	</multi-text>
</Layout>

生成されるPDF (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample1.pdf multi-text サンプル1』)


multi-textサンプル1
  • multi-text1:text-align指定なし("left"指定と同内容)、border-color="14,0,176"、background-color="0,255,255"
  • multi-text2:text-align="center"、border-color="14,0,176"、background-color="192,192,192"
  • multi-text3:text-align="right"、border-color="14,0,176"、background-color="255,255,0"
  • cell-widthで指定した幅にデータが入りきらない場合、自動的に折り返します。
    ⇒各1行目はcell-width="30"に入りきらないため、折り返されています。
  • データ内で改行されている場合、表示にもそのまま反映されます。
    ⇒1行目・2行目・3行目はそれぞれ改行されているのでcell-widthに関係なく改行されています。
  • multi-textの枠線や背景について詳細な定義を行うことができます。

multi-text サンプル2

行の配置(垂直方向):line-align属性に関するサンプルです。

multi-text サンプル2 (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample2.xml multi-text サンプル2』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Name="multi-textSample2" Width="180" Height="60" X="10" Y="10" Unit="mm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <!-- (1)multi-text1 -->

    <multi-text cell-width="30" cell-height="40" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">1行目テキストテキストテキスト
2行目テキスト
3行目テキスト</multi-text>
    <!-- (2)multi-text2 -->

    <multi-text x="40" cell-width="30" cell-height="40" text-align="left" line-align="center" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">1行目テキストテキストテキスト
2行目テキスト
3行目テキスト</multi-text>
    <!-- (3)multi-text3 -->

    <multi-text x="80" cell-width="30" cell-height="40" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">1行目テキストテキストテキスト
2行目テキスト
3行目テキスト</multi-text>
    <!-- (4)multi-text4 -->

    <multi-text x="120" cell-width="30" cell-height="40" text-align="left" line-align="even" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">1行目テキストテキストテキスト
2行目テキスト
3行目テキスト</multi-text>
</Layout>

生成されるPDF (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample2.pdf multi-text サンプル2』)

multi-textサンプル2
  • multi-text1:line-align指定なし("top"指定と同内容)
  • multi-text2:line-align = "centre"
  • multi-text3:line-align = "bottom"
  • multi-text4:line-align = "even"
  • multi-text要素では、垂直方向の初期値がtop(上揃え)となります。
    Label要素とは異なる点にご注意ください。

multi-text サンプル3

multi-text サンプル3 (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample3.xml multi-text サンプル3』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Name="multi-textSample3" Width="75" Height="110" X="10" Y="10" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <!-- (1)multi-text1 -->

    <multi-text y="75" cell-width="50" cell-height="15" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="0,0,0" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">オンデマンド・リアルタイムPDFジェネレータ</multi-text>
    <!-- (2)multi-text2 -->

    <multi-text y="50" cell-width="50" cell-height="15" text-align="left" line-align="top" narrow="size" line-space="3" font-family="MSGothic" font-style="PLAIN" border-color="0,0,0" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">オンデマンド・リアルタイムPDFジェネレータ</multi-text>
    <!-- (3)multi-text3 -->

    <multi-text y="25" cell-width="50" cell-height="15" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" char-space="3" border-color="0,0,0" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">オンデマンド・リアルタイムPDFジェネレータ</multi-text>
    <!-- (4)multi-text4 -->

    <multi-text cell-width="50" cell-height="15" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="0,0,0" margin="start:3;end:3;top:3;bottom:3" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">オンデマンド・リアルタイムPDFジェネレータ</multi-text>
</Layout>

生成されるPDF (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample3.pdf multi-text サンプル3』)


multi-textサンプル3
  • multi-text1:指定なし
  • multi-text2:line-space="3"
  • multi-text3:char-space="3"
  • multi-text4:margin="start:3;end:3;top:3;bottom:3"

multi-text サンプル4

インデントの指定方法に関するサンプルです。

multi-text サンプル4 (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample4.xml multi-text サンプル4』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="170" Height="100" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <!-- (1)1行目インデント -->

    <multi-text x="5" y="30" cell-width="40" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="2" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">XMLレイアウト情報とデータベースを組み合わせ、リアルタイムかつオンデマンドにPDFを生成します。
レイアウト・デザイナは、XMLの知識が無くてもExcel上から簡単にXMLレイアウト情報を作成できるツールです。
	</multi-text>
    <!-- (2)ぶらさげインデント -->

    <multi-text x="50" y="30" cell-width="40" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="10" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">XMLレイアウト情報とデータベースを組み合わせ、リアルタイムかつオンデマンドにPDFを生成します。
レイアウト・デザイナは、XMLの知識が無くてもExcel上から簡単にXMLレイアウト情報を作成できるツールです。
	</multi-text>
    <!-- (3)1行目インデント・ぶらさげインデント -->

    <multi-text x="95" y="30" cell-width="40" text-align="left" line-align="top" narrow="size" font-family="MSGothic" font-style="PLAIN" border-color="14,0,176" section-indent="10" text-indent="4" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">XMLレイアウト情報とデータベースを組み合わせ、リアルタイムかつオンデマンドにPDFを生成します。
レイアウト・デザイナは、XMLの知識が無くてもExcel上から簡単にXMLレイアウト情報を作成できるツールです。
	</multi-text>
</Layout>

生成されるPDF (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample4.pdf multi-text サンプル4』)


multi-textサンプル4
  • 1行目インデントに "2" を指定
  • ぶら下げインデントに "10" を指定
  • 1行目インデントに "4" 、ぶら下げインデントに "10" を指定
  • それぞれのインデント単位は、設定した値(単位)で反映

multi-text サンプル5

指定領域(x,y,cell-width,cell-height の各属性で指定)にデータが入りきらない場合の圧縮方法(narrow属性)に関するサンプルです。

multi-text サンプル5 (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample5.xml multi-text サンプル5』)

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="170" Height="100" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
    <!-- (1)圧縮無し -->

    <multi-text x="5.353" y="30" cell-width="40" cell-height="35" text-align="left" line-align="top" narrow="none" font-family="MSGothic" font-size="12" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">XMLレイアウト情報とデータベースを組み合わせ、リアルタイムかつオンデマンドにPDFを生成します。
レイアウト・デザイナは、XMLの知識が無くてもExcel上から簡単にXMLレイアウト情報を作成できるツールです。
	</multi-text>
    <!-- (2)圧縮 fontresize -->

    <multi-text x="50" y="30" cell-width="40" cell-height="35" text-align="left" line-align="top" narrow="fontresize" font-family="MSGothic" font-size="12" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">XMLレイアウト情報とデータベースを組み合わせ、リアルタイムかつオンデマンドにPDFを生成します。
レイアウト・デザイナは、XMLの知識が無くてもExcel上から簡単にXMLレイアウト情報を作成できるツールです。
	</multi-text>
    <!-- (3)圧縮 justify -->

    <multi-text x="95" y="30" cell-width="40" cell-height="35" text-align="left" line-align="top" narrow="justify" font-family="MSGothic" font-size="12" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">XMLレイアウト情報とデータベースを組み合わせ、リアルタイムかつオンデマンドにPDFを生成します。
レイアウト・デザイナは、XMLの知識が無くてもExcel上から簡単にXMLレイアウト情報を作成できるツールです。
	</multi-text>
    <Label Width="36.336" Height="5.644" X="5.997" Y="70.014" Horizon="left" Vertical="bottom" Vector="horizon" CharSpace="0" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">(1)narrow="none"</Label>
    <Label Width="36.336" Height="5.644" X="51.153" Y="69.661" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">(2)narrow="fontresize"</Label>
    <Label Width="36.336" Height="5.644" X="96.308" Y="69.308" Horizon="left" Vertical="bottom" Vector="horizon" Font="MSGothic" FontSize="12" FontStyle="PLAIN" Narrow="none">(3)narrow="justify"</Label>
</Layout>

(7行目抜粋)

<multi-text x="5.353" y="30" cell-width="40" cell-height="35" text-align="left" line-align="top" narrow="none" font-family="MSGothic" font-size="12" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">

(12行目抜粋)

<multi-text x="50" y="30" cell-width="40" cell-height="35" text-align="left" line-align="top" narrow="fontresize" font-family="MSGothic" font-size="12" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">

(17行目抜粋)

<multi-text x="95" y="30" cell-width="40" cell-height="35" text-align="left" line-align="top" narrow="justify" font-family="MSGothic" font-size="12" font-style="PLAIN" border-color="14,0,176" section-indent="0" text-indent="0" japanese-hyphenation="true" english-hyphenation="false" english-hyphenation-overrange="compress" flow="false">


生成されるPDF (『<biz-Stream_home>/sample/xml/multi-text/multi-textSample5.pdf multi-text サンプル5』)


multi-textサンプル5
  • 非圧縮
  • 領域を越えた分の比率でフォントサイズを縮小
  • 領域内に収まるようにフォントサイズを調整
  • narrow="size"の場合、xml_compatible.propertiesファイルのmultitext_narrow_3.1modeの設定に依存します。
    trueの場合 ・・・ justifyと同じ動作
    falseの場合 ・・・ fontresizeと同じ動作
  • narrow="resize"の場合は設定にかかわらず、justifyと同じ動作