activePDF Toolkit 2011 API リファレンス
GreyBar
テクニカル リファレンス > Toolkit オブジェクト > Toolkit メソッド > GreyBar

Glossary Item Box

説明: 新しいページまたは既存のページの指定した場所に灰色のバーを挿入します。
構文: object.GreyBar LLX, LLY, Width, Height, GreyLevel, PageNr
引数: 引数 値の型 説明 & 設定
object N/A オブジェクトのインスタンスを設定します。
LLX Float バーの左下角の X 座標。PDF 座標で指定します。
LLY Float バーの左下角の Y 座標。PDF 座標で指定します。
Width Float バーの幅。PDF の表示単位で指定します。
Height Float バーの高さ。PDF の表示単位で指定します。
GreyLevel Float 0.0 から 1.0 までの灰色の量 (0.0 は黒、1.0 は白)
PageNr Long オプション

0 = 新規または現在開いているページにリンクを追加します。(デフォルト)

>1 = 指定したページで動作

-1 = すべてのページで動作
例:
'GreyBar Example
Set TK = CreateObject("APToolkit.Object")

r = TK.OpenOutputFile("GreyBar.pdf")

'Set the font for the printed text
TK.SetFont "Helvetica", 20, 0

'Get the width of the text so that it can be centered on the page
strText = "This is the Page Title"
strTextWidth = TK.GetTextWidth(strText)

'Print the text centered
strPageWidth = 612 '8.5" (72 = 1")
strLLX = (strPageWidth - strTextWidth) / 2
strLLY = 740
TK.PrintText strLLX, strLLY, strText, 0

'Set a grey bar under the page title
TK.GreyBar 30, 720, strPageWidth - 60, 3, 0.8, 0

TK.CloseOutputFile
Set TK = Nothing