getPMTrayListメソッド
帳票サーバのOSに登録されているプリンタを指定し,そのプリンタのトレイ一覧を取得します。
形式
public ArrayList getPMTrayList (String newPrinterName) throws EURPMException
引数
newPrinterName
OS上のプリンタ名
戻り値
指定したOS上のプリンタのトレイ一覧を,次に示す形式で返します。
<配列イメージ>
OS上のプリンタのトレイ名1
OS上のプリンタのトレイ名2
:
OS上のプリンタのトレイ名n
例外処理
EURPMException
エラー発生時は,EURPMException例外がスローされます。
呼び出し例
getPMTrayListメソッドの呼び出し例を次に示します。
try {
adp = new EURPMAdapterForJava();
}
catch (Exception e) {
System.out.println("Adapterオブジェクト生成エラー");
}
strPrinterName="PRINTER1";
System.out.println("PrinterName =["+ strPrinterName +"]");
System.out.println("getPMTrayList実行");
try{
ArrayList alTrays=adp.getPMTrayList(strPrinterName);
for(cntj=0;cntj<alTrays.size();cntj++){
System.out.println("OS上のプリンタのトレイ名
=["+alTrays.get(cntj)+"]");
}
}
catch(EURPMException e){
intiCode=e.getErrorCode();
System.out.println(Integer.toString(iCode));
System.out.println(e.getMessage());
System.out.println(e.getKey());
e.printStackTrace();
}