API version 4
- ‐
RW
integer
paperWidth¶
用紙の幅を指定します。
用紙の幅を0.1mm単位の数値で指定します。
orientation・paperSizeプロパティを指定した場合は、その用紙にあった数値が設定されます。 paperWidthを直接設定した場合、paperSizeプロパティはPAPERSIZE_UNKNOWNに設定されます。
初期値は2100(A4縦)です。
関連項目
paperSize、 orientation、 paperHeight プロパティ
使用例
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;
}
}