打印二开常见问题(一)

1、如何获取打印设置中数据
Map<String, Object> printSetting = null; String configKey = this.param.getEntityId() + "_printsetting"; long currUserId = RequestContext.get().getCurrUserId(); String settingData = UserConfigServiceHelper.getSetting(currUserId, configKey); this.printSetting = (Map)SerializationUtils.fromJsonString(settingData, Map.class);
2、如何使打印的文件以页签打开
FormShowParameter para = new FormShowParameter();
para.setFormId("bos_printpreview");
para.getOpenStyle().setShowType(ShowType.MainNewTabPage);
Map<String, String> reservedSpace = new HashMap(1);
reservedSpace.put("reservedSpace", "true");
para.getOpenStyle().setCustParam(reservedSpace);
para.setCustomParam("url", String.format(UrlService.getDomainContextUrl() + "/api/print/download.do?taskId=%s&attachId=%s", printTaskId, attach.getAttachId()));
previewView.showForm(para);
actionView.sendFormAction(previewView);3、预览打印文件的url
UrlService.getDomainContextUrl() + "/api/print/download.do?taskId=%s&attachId=%s"
4、下载打印文件的url
UrlService.getDomainContextUrl()+"/tempfile/download.do?"+attachDetail.getFilePath();
5、如何修改打印文件的名称
继承AbstractPrintPlugin插件,在b
打印二开常见问题(一)
1、如何获取打印设置中数据Map<String, Object> printSetting = null;String configKey = this.param.getEntityId() + "_printsetting";lon...
点击下载文档文档为doc格式
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
上一篇
已经是第一篇



