使用打印机名选择接口实现批量静默打印
使用打印机名选择接口实现批量静默打印【SelectPrinterExt,P...
1、选择打印机名称:
private selectPrinterNameButtonClick(e){
//参数 0:只返回选中的打印机名称,1:同时返回当前可用打印机列表,100:只返回当前可用的打印机列表
this.View.AddAction("SelectPrinterExt",0)
}
protected override CustomEvents(e){
//参数0 e.EventArgs:{"Data":"{\"Selected\":true,\"PrinterName\":\"Doro PDF Writer\" }","RetType":0}
//参数1 e.EventArgs:{"Data":"{\"Selected\":true,\"PrinterName\":\"Doro PDF Writer\" ,\"AllPrinterNames\":[\"Microsoft XPS Document Writer\",\"Doro PDF Writer\"]}","RetType":1}
//参数100 e.EventArgs:{"Data":"{\"Selected\":true ,\"AllPrinterNames\":[\"Microsoft XPS Document Writer\",\"Doro PDF Writer\"]}","RetType":100}
var printNameObject = e.EventArgs;
}
2、获取名称后调用打印进行静默打印;
/// <summary>
/// 打印
/// </summary>
/// <param name="printJobId">打印任务ID</param>
/// <param name="printType">打印类型</param>
/// <param name="printer">打印机ID</param>
public void NoteTemplateOperation(string printJobId, string printType, object printer = null, string printBarName = null)
{
JSONObject jsonObj = new JSONObject();
jsonObj.Put("pageID", this.View.PageId);
jsonObj.Put("printJobId", printJobId);
jsonObj.Put("action", printType);
string action = string.Empty;
if (printType.EqualsIgnoreCase("preview") || printType.EqualsIgnoreCase("PrintMergePreview"))
{
action = JSAction.printPreview;
jsonObj.Put("printBarName", printBarName);
}
else if (printType.EqualsIgnoreCase("print") || printType.EqualsIgnoreCase("PrintMerge"))
{
action = JSAction.print;
jsonObj.Put("printerAddress", printer.IsNullOrEmpty() == true ? string.Empty : Convert.ToString(printer));
}
this.View.AddAction(action, jsonObj);
}
使用打印机名选择接口实现批量静默打印
本文2024-09-23 03:48:55发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-161275.html
- 鼎捷EAI整合規範文件V3.1.07 (集團).pdf
- 鼎捷OpenAPI應用場景說明_基礎資料.pdf
- 鼎捷OpenAPI應用場景說明_財務管理.pdf
- 鼎捷T100 API設計器使用手冊T100 APIDesigner(V1.0).docx
- 鼎新e-GoB2雲端ERP B2 線上課程E6-2應付票據整批郵寄 領取.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程A4使用者建立權限設定.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程C3會計開帳與會計傳票.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程E6-1應付票據.pdf
- 鼎新e-GoB2雲端ERP B2 線上課程A5-1進銷存參數設定(初階篇).pdf
- 鼎新e-GoB2雲端ERP B2 線上課程D2帳款開帳與票據開帳.pdf