API version 4
- ‐
RW
integer
paperSize¶
用紙サイズを指定します。
用紙サイズを指定します。指定値に基づいてpaperWidth・paperHeightプロパティの値が設定されます。
初期値はPAPERSIZE_A4です。
関連項目
orientation、 paperWidth、 paperHeight プロパティ
定数一覧
------------------------------------------------------------
定数値 |
説明 |
---|---|
PAPERSIZE_UNKNOWN |
0: 不明 |
PAPERSIZE_A3 |
8: A3(横297mm×縦420mm) |
PAPERSIZE_A4 |
9: A4(横210mm×縦297mm) |
PAPERSIZE_B4 |
12: B4(横257mm×縦364mm) |
使用例
CRSダウンロード
Form formPrintForm {
x = 0;
y = 0;
width = 800;
height = 600;
PrintForm printform1 {
documentTitle="PrintForm出力テスト";
marginLeft = 30; # 3mm
marginTop = 30; # 3mm
orientation = ORIENTATION_PORTRAIT;
paperSize = PAPERSIZE_A4;
print("paperWidth = ", paperWidth / 10.0 , "mm");
print("paperHeight = ", paperHeight / 10.0 , "mm");
x = 8; y = 72; width = 256; height = 362;
TextField textfield1 {
x = 16; y = 64; width = 224; height = 32;
horizontalAlign = ALIGN_CENTER;
value="PrintForm出力サンプル";
}
}
Button buttonPrint {
x = 8; y = 8; width = 56; height = 24; title = "印刷";
function onTouch(e) {
^.printpreview1.clearPages();
^.printpreview1.document = ^.printform1.printDocument();
}
}
PrintPreview printpreview1 {
x = 272; y = 8; width = 488; height = 472;
}
}