biz-Streamマニュアル XMLページレイアウトタグ リファレンス 第17章 透かし 17.3 横書き透かしテキスト<watermark-text>

17.3 横書き透かしテキスト<watermark-text>


17.3.1機能説明

透かし文字として横書きテキストの定義を行います。



17.3.2属性説明

属性説明
属性名指定説明指定内容初期値
name任意名前CDATA
x任意X座標CDATA0
x任意X座標CDATA0
y任意Y座標CDATA0
width任意描画領域の幅CDATA
height任意描画領域の高さCDATA
unit任意単位(Choice)mm / cm / in / px / ptmm
text-align任意水平方向の配置(Choice)left / center / right / evenleft
line-align任意垂直方向の配置(Choice)top / center / bottom / evenbottom
char-space任意文字間隔CDATA0
font-family任意フォント種類(Choice)「6.2 線<Line>」にある属性説明の「LineStyle属性」を参照MSGothic
font-color任意フォントカラーCDATA0
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 フォントごとのデフォルト値
text-rendering任意文字の形状(Choice)stroke / fillstroke
line-width任意文字枠線の太さCDATA0.1
rotate任意回転角度CDATA0 ~ 3600
narrow任意領域にデータが入りきらない場合の圧縮方法または拡大縮小方法(Choice)horizon / size / nonehorizon
  • (注)初期値:出荷時のXMLデフォルト情報(default_values.properties)値を表します。ユーザにより値の変更が行われた場合は内容が異なります。


17.3.3記述例

watermark-textサンプル1

テキストの指定方法に関するサンプルです。

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

<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Width="300pt" Height="400pt" 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">
    <watermark x="28.222" y="51.153" dx="0" dy="0" width="140px" height="110px" line-space="1mm" text-align="center" line-align="center" align="vertical" print="true" view="true" rate="80" fit="horizon">
        <watermark-text text-align="left" line-align="top" font-family="MSGothic" font-color="255,0,0" font-style="PLAIN" rotate="15" narrow="horizon" text-rendering="stroke">BrainSellers.com Corporation 15゜</watermark-text>
        <watermark-text text-align="left" line-align="top" font-family="MSGothic" font-color="255,0,0" font-style="PLAIN" rotate="0" narrow="horizon" text-rendering="fill">BrainSellers.com Corporation 0゜</watermark-text>
        <watermark-text text-align="left" line-align="top" font-family="MSGothic" font-color="255,0,0" font-style="PLAIN" rotate="345" narrow="horizon" text-rendering="stroke">BrainSellers.com Corporation 345゜</watermark-text>
    </watermark>
</Layout>

生成されるPDF(『<biz-Stream_home>/sample/xml/watermark/watermarkSampleText1.pdf』)


回転属性(rotate)を指定したサンプルです。


横書き透かし

回転(rotate属性)は文字の左端を軸に反時計周りで回転します。


  • 15°の指定です。
  • 0°の指定です。(初期値)
  • 345°の指定です。