查看pdf修改

master
ALW 3 years ago
parent 3d0ea8a568
commit 2bd840766e

@ -20,6 +20,7 @@ import com.emr.service.recordType.EmrTypeRelatedService;
import com.emr.service.recordType.EmrTypeService; import com.emr.service.recordType.EmrTypeService;
import com.emr.service.tScanAssort.T_Scan_AssortService; import com.emr.service.tScanAssort.T_Scan_AssortService;
import com.emr.util.ExceptionPrintUtil; import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Jpg2PdfUtil;
import com.emr.util.img2PdfUtil; import com.emr.util.img2PdfUtil;
import com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo; import com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo;
import com.emr.vo.FontVo.ScanAssortVo; import com.emr.vo.FontVo.ScanAssortVo;
@ -38,6 +39,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -63,6 +65,8 @@ public class CommomSearchController {
@Autowired @Autowired
private CommomMapper commomMapper; private CommomMapper commomMapper;
@Autowired @Autowired
private Archive_DetailMapper archiveDetailMapper;
@Autowired
private EmrTypeRelatedService typeRelatedService; private EmrTypeRelatedService typeRelatedService;
@Autowired @Autowired
private T_Scan_AssortService scanAssortService; private T_Scan_AssortService scanAssortService;
@ -241,19 +245,19 @@ public class CommomSearchController {
String attending = null; String attending = null;
String fileSource = null; String fileSource = null;
List<CommomVo> commomVos = commomMapper.selectAllAndPatientId(patientId); List<CommomVo> commomVos = commomMapper.selectAllAndPatientId(patientId);
for (CommomVo list:commomVos){ for (CommomVo list : commomVos) {
admissTimes = list.getAdmissTimes(); admissTimes = list.getAdmissTimes();
name = list.getName(); name = list.getName();
fileSource = list.getFileSource(); fileSource = list.getFileSource();
disDate = list.getDisDate(); disDate = list.getDisDate();
disDept = list.getDisDept(); disDept = list.getDisDept();
attending = list.getAttending(); attending = list.getAttending();
} }
String userName = user.getUserPosition(); String userName = user.getUserPosition();
SimpleDateFormat formatter= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss "); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
Date date = new Date(System.currentTimeMillis()); Date date = new Date(System.currentTimeMillis());
String format = formatter.format(date); String format = formatter.format(date);
browseRecords browseRecords=new browseRecords(); browseRecords browseRecords = new browseRecords();
browseRecords.setAdmissTimes(admissTimes); browseRecords.setAdmissTimes(admissTimes);
browseRecords.setPatientName(name); browseRecords.setPatientName(name);
browseRecords.setDisDate(disDate); browseRecords.setDisDate(disDate);
@ -264,30 +268,30 @@ public class CommomSearchController {
browseRecords.setBrowseName(userName); browseRecords.setBrowseName(userName);
// 获取访问真实IP // 获取访问真实IP
String ipAddress = request.getHeader("x-forwarded-for"); String ipAddress = request.getHeader("x-forwarded-for");
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("Proxy-Client-IP"); ipAddress = request.getHeader("Proxy-Client-IP");
} }
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("WL-Proxy-Client-IP"); ipAddress = request.getHeader("WL-Proxy-Client-IP");
} }
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getRemoteAddr(); ipAddress = request.getRemoteAddr();
if("127.0.0.1".equals(ipAddress) || "0:0:0:0:0:0:0:1".equals(ipAddress)){ if ("127.0.0.1".equals(ipAddress) || "0:0:0:0:0:0:0:1".equals(ipAddress)) {
//根据网卡取本机配置的IP //根据网卡取本机配置的IP
InetAddress inet=null; InetAddress inet = null;
try { try {
inet = InetAddress.getLocalHost(); inet = InetAddress.getLocalHost();
} catch (UnknownHostException e) { } catch (UnknownHostException e) {
e.printStackTrace(); e.printStackTrace();
} }
assert inet != null; assert inet != null;
ipAddress= inet.getHostAddress(); ipAddress = inet.getHostAddress();
} }
} }
//对于通过多个代理的情况第一个IP为客户端真实IP,多个IP按照','分割 //对于通过多个代理的情况第一个IP为客户端真实IP,多个IP按照','分割
if(ipAddress!=null && ipAddress.length()>15){ //"***.***.***.***".length() = 15 if (ipAddress != null && ipAddress.length() > 15) { //"***.***.***.***".length() = 15
if(ipAddress.indexOf(",")>0){ if (ipAddress.indexOf(",") > 0) {
ipAddress = ipAddress.substring(0,ipAddress.indexOf(",")); ipAddress = ipAddress.substring(0, ipAddress.indexOf(","));
} }
} }
browseRecords.setIp(ipAddress); browseRecords.setIp(ipAddress);
@ -296,7 +300,7 @@ public class CommomSearchController {
} }
@RequestMapping("showRecordSouth") @RequestMapping("showRecordSouth")
public String showRecordSouth(String patientId, String userName, String deptName ,Model model, HttpServletRequest request) { public String showRecordSouth(String patientId, String userName, String deptName, Model model, HttpServletRequest request) {
model.addAttribute("patientId", patientId); model.addAttribute("patientId", patientId);
model.addAttribute("userName", userName); model.addAttribute("userName", userName);
model.addAttribute("deptName", deptName); model.addAttribute("deptName", deptName);
@ -434,6 +438,7 @@ public class CommomSearchController {
/** /**
* 访 * 访
*
* @param userName * @param userName
* @param flag * @param flag
* @param model * @param model
@ -557,92 +562,189 @@ public class CommomSearchController {
if (typeId != null) { if (typeId != null) {
typeRelateds = typeRelatedService.selectAssortIdsByTypeId(typeId); typeRelateds = typeRelatedService.selectAssortIdsByTypeId(typeId);
} }
//第一级:全部影像资料 if (commomVos.size() > 0) {
CommomTree tree1 = new CommomTree(); //第一级:全部影像资料
Integer id = 1; CommomTree tree1 = new CommomTree();
tree1.setId(id); Integer id = 1;
tree1.setNewName("全部影像资料"); tree1.setId(id);
if (null != commomVos && !commomVos.isEmpty()) { tree1.setNewName("全部影像资料");
//去重,取出不重复的分类集合 if (null != commomVos && !commomVos.isEmpty()) {
Map<String, CommomTree> assortMap = new LinkedHashMap<>(); //去重,取出不重复的分类集合
for (CommomTree commomVo1 : commomVos) { Map<String, CommomTree> assortMap = new LinkedHashMap<>();
assortMap.put(commomVo1.getAssortId(), commomVo1); for (CommomTree commomVo1 : commomVos) {
} assortMap.put(commomVo1.getAssortId(), commomVo1);
//判断分类是否全选,全选,父类跟着全选 }
if (null != typeRelateds && !typeRelateds.isEmpty()) { //判断分类是否全选,全选,父类跟着全选
boolean checkedFlag = true; if (null != typeRelateds && !typeRelateds.isEmpty()) {
for (Map.Entry<String, CommomTree> map : assortMap.entrySet()) { boolean checkedFlag = true;
//定义是否存在 for (Map.Entry<String, CommomTree> map : assortMap.entrySet()) {
boolean flag = false; //定义是否存在
for (Emr_Type_Related typeRelated : typeRelateds) { boolean flag = false;
if (typeRelated.getAssortId().equals(map.getKey())) { for (Emr_Type_Related typeRelated : typeRelateds) {
flag = true; if (typeRelated.getAssortId().equals(map.getKey())) {
flag = true;
break;
}
}
if (!flag) {
checkedFlag = false;
break; break;
} }
} }
if (!flag) { if (checkedFlag) {
checkedFlag = false; tree1.setChecked("true");
break;
} }
} } else {
if (checkedFlag) {
tree1.setChecked("true"); tree1.setChecked("true");
} }
} else { treeList.add(tree1);
tree1.setChecked("true"); int oneId = 0;
for (Map.Entry<String, CommomTree> map : assortMap.entrySet()) {
id++;
oneId = id;
String assortId = map.getValue().getAssortId();
CommomTree tree2 = new CommomTree();
tree2.setId(id);
tree2.setParentId(1);
tree2.setAssortId(map.getValue().getAssortId());
//判断选中
boolean checkFlag = false;
if (null != typeRelateds && !typeRelateds.isEmpty()) {
for (Emr_Type_Related typeRelated : typeRelateds) {
if (StringUtils.isNotBlank(assortId) && assortId.equals(typeRelated.getAssortId())) {
tree2.setChecked("true");
checkFlag = true;
break;
}
}
} else {
checkFlag = true;
tree2.setChecked("true");
}
//定义该类影像图片数量
int scanPathCount = 0;
//第二层 图片
for (CommomTree commomVo : commomVos) {
if (StringUtils.isNotBlank(assortId) && StringUtils.isNotBlank(commomVo.getAssortId()) &&
assortId.equals(commomVo.getAssortId())) {
id++;
CommomTree tree3 = new CommomTree();
tree3.setId(id);
tree3.setParentId(oneId);
tree3.setAssortId(assortId);
if (checkFlag) {
tree3.setChecked("true");
}
scanPathCount++;
//图片名称
String name = commomVo.getScanPage();
tree3.setAssortName(name);
//设置树图片节点的名称
tree3.setNewName("(第" + scanPathCount + "页)" + name);
tree3.setSource(commomVo.getSource());
//存储水印图片
treeList.add(tree3);
}
}
tree2.setNewName(map.getValue().getAssortName() + "(" + scanPathCount + ")");
treeList.add(tree2);
}
} }
treeList.add(tree1); }
int oneId = 0; List<Archive_Detail> archiveDetails = new ArrayList<>();
for (Map.Entry<String, CommomTree> map : assortMap.entrySet()) { if (commomVos.size() == 0) {
id++; List<CommomTree> archiveDetail = archiveDetailMapper.selectPdfPathByPatient2(patientId);
oneId = id; //第一级:全部影像资料
String assortId = map.getValue().getAssortId(); CommomTree tree1 = new CommomTree();
CommomTree tree2 = new CommomTree(); Integer id = 1;
tree2.setId(id); tree1.setId(id);
tree2.setParentId(1); tree1.setNewName("全部影像资料");
tree2.setAssortId(map.getValue().getAssortId()); if (null != archiveDetail && !archiveDetail.isEmpty()) {
//判断选中 //去重,取出不重复的分类集合
boolean checkFlag = false; Map<String, CommomTree> assortMap = new LinkedHashMap<>();
for (CommomTree commomVo1 : archiveDetail) {
assortMap.put(commomVo1.getAssortId(), commomVo1);
}
//判断分类是否全选,全选,父类跟着全选
if (null != typeRelateds && !typeRelateds.isEmpty()) { if (null != typeRelateds && !typeRelateds.isEmpty()) {
for (Emr_Type_Related typeRelated : typeRelateds) { boolean checkedFlag = true;
if (StringUtils.isNotBlank(assortId) && assortId.equals(typeRelated.getAssortId())) { for (Map.Entry<String, CommomTree> map : assortMap.entrySet()) {
tree2.setChecked("true"); //定义是否存在
checkFlag = true; boolean flag = false;
for (Emr_Type_Related typeRelated : typeRelateds) {
if (typeRelated.getAssortId().equals(map.getKey())) {
flag = true;
break;
}
}
if (!flag) {
checkedFlag = false;
break; break;
} }
} }
if (checkedFlag) {
tree1.setChecked("true");
}
} else { } else {
checkFlag = true; tree1.setChecked("true");
tree2.setChecked("true");
} }
//定义该类影像图片数量 treeList.add(tree1);
int scanPathCount = 0; int oneId = 0;
//第二层 图片 for (Map.Entry<String, CommomTree> map : assortMap.entrySet()) {
for (CommomTree commomVo : commomVos) { id++;
if (StringUtils.isNotBlank(assortId) && StringUtils.isNotBlank(commomVo.getAssortId()) && oneId = id;
assortId.equals(commomVo.getAssortId())) { String assortId = map.getValue().getAssortId();
id++; CommomTree tree2 = new CommomTree();
CommomTree tree3 = new CommomTree(); tree2.setId(id);
tree3.setId(id); tree2.setParentId(1);
tree3.setParentId(oneId); tree2.setAssortId(map.getValue().getAssortId());
tree3.setAssortId(assortId); //判断选中
if (checkFlag) { boolean checkFlag = false;
tree3.setChecked("true"); if (null != typeRelateds && !typeRelateds.isEmpty()) {
for (Emr_Type_Related typeRelated : typeRelateds) {
if (StringUtils.isNotBlank(assortId) && assortId.equals(typeRelated.getAssortId())) {
tree2.setChecked("true");
checkFlag = true;
break;
}
} }
scanPathCount++; } else {
//图片名称 checkFlag = true;
String name = commomVo.getScanPage(); tree2.setChecked("true");
tree3.setAssortName(name); }
//设置树图片节点的名称 //定义该类影像图片数量
tree3.setNewName("(第" + scanPathCount + "页)" + name); int scanPathCount = 0;
tree3.setSource(commomVo.getSource()); //第二层 图片
//存储水印图片 int scanPathCountNum = 0;
treeList.add(tree3); for (CommomTree commomVo : archiveDetail) {
if (StringUtils.isNotBlank(assortId) && StringUtils.isNotBlank(commomVo.getAssortId()) &&
assortId.equals(commomVo.getAssortId())) {
id++;
CommomTree tree3 = new CommomTree();
tree3.setId(id);
tree3.setParentId(oneId);
tree3.setAssortId(assortId);
if (checkFlag) {
tree3.setChecked("true");
}
scanPathCount++;
//图片名称
String name = commomVo.getScanPage();
tree3.setAssortName(name);
//设置树图片节点的名称
tree3.setNewName(commomVo.getTitle());
tree3.setSource(commomVo.getSource());
//存储水印图片
treeList.add(tree3);
scanPathCountNum = commomVo.getPageCount();
}
} }
tree2.setNewName(map.getValue().getAssortName() + "(" + scanPathCountNum + ")");
treeList.add(tree2);
} }
tree2.setNewName(map.getValue().getAssortName() + "(" + scanPathCount + ")");
treeList.add(tree2);
} }
} }
return JSON.toJSONString(treeList); return JSON.toJSONString(treeList);
@ -673,6 +775,28 @@ public class CommomSearchController {
return ResultUtil.ok(outs); return ResultUtil.ok(outs);
} }
@RequestMapping(value = "selectPrintPic2", method = RequestMethod.POST)
@ResponseBody
public ResultUtil selectPrintPic2(HttpServletResponse response, String patientId, String rootPaths, String names, String sources, HttpServletRequest request) throws Exception {
//生成加载进度mapKey
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String mapKey = user.getUserName() + "_" + patientId;
List<String> outs = commomService.selectPrintPic2(response, patientId, names, sources, mapKey);
return ResultUtil.ok(outs);
}
// @RequestMapping("showPdf")
// public void showPdf(String patientId, HttpServletRequest request, HttpServletResponse response) {
// EmrPdfWaterSet emrPdfWaterSet = new EmrPdfWaterSet();
// Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
// String mapKey = user.getUserName() + "_" + patientId;
// List<String> fileList = (List<String>) request.getSession().getAttribute(mapKey);
// String pdfWater = "儿童医院";
// Jpg2PdfUtil.mulFile2One(response, fileList, pdfWater);
// }
/** /**
* *
* *
@ -714,9 +838,9 @@ public class CommomSearchController {
*/ */
@RequestMapping(value = "showRecordContentBlood") @RequestMapping(value = "showRecordContentBlood")
@ResponseBody @ResponseBody
public ResultUtil showRecordContentBlood(String patientId, String scanPages, String sources, String flag, HttpServletResponse response,HttpServletRequest request) { public ResultUtil showRecordContentBlood(String patientId, String scanPages, String sources, String flag, HttpServletResponse response, HttpServletRequest request) {
try { try {
commomService.showRecordContentBlood(patientId, scanPages, sources, flag, response,request); commomService.showRecordContentBlood(patientId, scanPages, sources, flag, response, request);
return ResultUtil.ok(); return ResultUtil.ok();
} catch (Exception e) { } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);
@ -727,35 +851,45 @@ public class CommomSearchController {
@RequestMapping(value = "getRecordContentBlood") @RequestMapping(value = "getRecordContentBlood")
@ResponseBody @ResponseBody
public void getRecordContentBlood(String patientId,HttpServletRequest request,HttpServletResponse response) { public void getRecordContentBlood(String patientId, HttpServletRequest request, HttpServletResponse response) {
try { List<CommomTree> commomTrees = archiveDetailMapper.selectPdfPathByPatient2(patientId);
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER"); if (commomTrees.size() == 0) {
String mapKey = user.getUserName() + "_" + patientId; try {
List<String> scanPages = (List<String>)request.getSession().getAttribute(mapKey); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
if(!CollectionUtils.isEmpty(scanPages)) { String mapKey = user.getUserName() + "_" + patientId;
String pdfName = "档案管理PDF"; List<String> scanPages = (List<String>) request.getSession().getAttribute(mapKey);
//根据图片路径转换pdf if (!CollectionUtils.isEmpty(scanPages)) {
EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1); String pdfName = "档案管理PDF";
//定义第二文本水印 姓名 + 科室 + ip //根据图片路径转换pdf
EmrPdfWaterSet emrPdfWaterSet1 = commomService.getEmrPdfWaterSet(emrPdfWaterSet); EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1);
//获取角色是否加水印 //定义第二文本水印 姓名 + 科室 + ip
Integer userSex = user.getUserSex(); EmrPdfWaterSet emrPdfWaterSet1 = commomService.getEmrPdfWaterSet(emrPdfWaterSet);
if(userSex == null || userSex == 0){ //获取角色是否加水印
emrPdfWaterSet.setEffective(Short.valueOf("0")); Integer userSex = user.getUserSex();
emrPdfWaterSet1.setEffective(Short.valueOf("0")); if (userSex == null || userSex == 0) {
emrPdfWaterSet.setEffective(Short.valueOf("0"));
emrPdfWaterSet1.setEffective(Short.valueOf("0"));
}
img2PdfUtil.imageToPdf(response, scanPages, pdfName, emrPdfWaterSet, emrPdfWaterSet1);
//移除缓存
request.removeAttribute(mapKey);
} }
img2PdfUtil.imageToPdf(response, scanPages, pdfName, emrPdfWaterSet,emrPdfWaterSet1); } catch (Exception e) {
//移除缓存 ExceptionPrintUtil.printException(e);
request.removeAttribute(mapKey); e.printStackTrace();
} }
} catch (Exception e) { } else {
ExceptionPrintUtil.printException(e); String pdfWater = "";
e.printStackTrace(); Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String mapKey = user.getUserName() + "_" + patientId;
List<String> filePaths = (List<String>) request.getSession().getAttribute(mapKey);
Jpg2PdfUtil.mulFile2One(response, filePaths, pdfWater);
} }
} }
/** /**
* 访 * 访
*
* @param patientId * @param patientId
* @param userName * @param userName
* @param scanPages * @param scanPages
@ -767,8 +901,8 @@ public class CommomSearchController {
@ResponseBody @ResponseBody
public void showRecordContentSouth(String patientId, String userName, String deptName, String scanPages, String sources, String flag, HttpServletResponse response, HttpServletRequest request) { public void showRecordContentSouth(String patientId, String userName, String deptName, String scanPages, String sources, String flag, HttpServletResponse response, HttpServletRequest request) {
try { try {
userName = (String)request.getSession().getAttribute("userName"); userName = (String) request.getSession().getAttribute("userName");
deptName = (String)request.getSession().getAttribute("deptName"); deptName = (String) request.getSession().getAttribute("deptName");
commomService.showRecordContentSouth(patientId, userName, deptName, scanPages, sources, flag, response); commomService.showRecordContentSouth(patientId, userName, deptName, scanPages, sources, flag, response);
} catch (Exception e) { } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);

@ -3,6 +3,7 @@ package com.emr.controller.templateSearch;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.emr.annotation.OptionalLog; import com.emr.annotation.OptionalLog;
import com.emr.controller.FormTokenFlagUtil; import com.emr.controller.FormTokenFlagUtil;
import com.emr.dao.Archive_DetailMapper;
import com.emr.dao.CommomMapper; import com.emr.dao.CommomMapper;
import com.emr.dao.EmrComomSetMapper; import com.emr.dao.EmrComomSetMapper;
import com.emr.dao.Emr_DictionaryMapper; import com.emr.dao.Emr_DictionaryMapper;
@ -27,6 +28,7 @@ import com.emr.service.emrPrintOrDownLoadInfo.PrintOrDownLoadInfoService;
import com.emr.service.templateSearch.TemplateSearchService; import com.emr.service.templateSearch.TemplateSearchService;
import com.emr.util.*; import com.emr.util.*;
import com.emr.vo.Msg; import com.emr.vo.Msg;
import com.emr.vo.commomSearch.CommomTree;
import com.emr.vo.commomSearch.CommomVo; import com.emr.vo.commomSearch.CommomVo;
import com.emr.vo.commomSearch.ScanPathForPatientListVo; import com.emr.vo.commomSearch.ScanPathForPatientListVo;
import com.emr.vo.commomSearch.ScanPathVo; import com.emr.vo.commomSearch.ScanPathVo;
@ -98,6 +100,8 @@ public class TemplateSearchController {
private EmrComomSetMapper emrComomSetMapper; private EmrComomSetMapper emrComomSetMapper;
@Autowired @Autowired
private CommomService commomService; private CommomService commomService;
@Autowired
private Archive_DetailMapper archiveDetailMapper;
/** /**
* @MethodName templateList * @MethodName templateList
@ -1323,6 +1327,19 @@ public class TemplateSearchController {
emrPdfWaterSet.setIsImg(emrPdfWaterSet.getDownloadIsImg()); emrPdfWaterSet.setIsImg(emrPdfWaterSet.getDownloadIsImg());
EmrPdfWaterSet emrPdfWaterSet1 = commomService.getEmrPdfWaterSet(emrPdfWaterSet); EmrPdfWaterSet emrPdfWaterSet1 = commomService.getEmrPdfWaterSet(emrPdfWaterSet);
img2PdfUtil.imageToPdf(response, filePaths, pdfName, emrPdfWaterSet,emrPdfWaterSet1); img2PdfUtil.imageToPdf(response, filePaths, pdfName, emrPdfWaterSet,emrPdfWaterSet1);
}else {
String fileRealPath=null;
List<CommomTree> commomTrees = archiveDetailMapper.selectPdfPathByPatient3(patientIds, assortIds);
List<String> filePaths = new ArrayList();
for (int i = 0; i < commomTrees.size(); ++i) {
fileRealPath = commomTrees.get(i).getPDFPATH();
if (StringUtils.isNoneBlank(new CharSequence[]{fileRealPath})) {
filePaths.add(fileRealPath);
}
}
SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMdd");
String filename=fmt.format(new Date());
Jpg2PdfUtil.mulFile2One3(response,filePaths,filename);
} }
} catch (Exception e) { } catch (Exception e) {
ExceptionPrintUtil.printException(e); ExceptionPrintUtil.printException(e);

@ -1,6 +1,7 @@
package com.emr.dao; package com.emr.dao;
import com.emr.entity.Archive_Detail; import com.emr.entity.Archive_Detail;
import com.emr.vo.commomSearch.CommomTree;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -12,5 +13,10 @@ public interface Archive_DetailMapper {
List<Archive_Detail> selectPdfPathByPatient(@Param("patientId")String patientId,@Param("assortIds")String assortIds); List<Archive_Detail> selectPdfPathByPatient(@Param("patientId")String patientId,@Param("assortIds")String assortIds);
List<CommomTree> selectPdfPathByPatient2(@Param("patientId")String patientId);
List<CommomTree> selectPdfPathByPatient3(@Param("patientIds")String patientIds,@Param("assortIds")String assortIds);
List<Archive_Detail> selectPdfCountByMasterId(@Param("patientId")String patientId); List<Archive_Detail> selectPdfCountByMasterId(@Param("patientId")String patientId);
} }

@ -19,8 +19,19 @@ public class Archive_Detail {
private String flag; private String flag;
private String sys; private String sys;
public String getAssortName() {
return assortName;
}
public void setAssortName(String assortName) {
this.assortName = assortName;
}
private String assortName;
public String getId() { public String getId() {
return id; return id;
} }

@ -227,7 +227,8 @@ public class CommomService {
if ("1".equals(sourceArr[i])) { if ("1".equals(sourceArr[i])) {
srcStr = root1 + File.separator + scanPageArr[i]; srcStr = root1 + File.separator + scanPageArr[i];
} else { } else {
srcStr = root2 + File.separator + scanPageArr[i]; // srcStr = root2 + File.separator + scanPageArr[i];
srcStr = scanPageArr[i];
} }
} }
src.add(srcStr); src.add(srcStr);
@ -639,6 +640,62 @@ public class CommomService {
return outs; return outs;
} }
public List<String> selectPrintPic2(HttpServletResponse response, String patientId,String names, String sources, String mapKey) {
List<String> outs = new LinkedList<>();
if (StringUtils.isNotBlank(names)) {
String[] nameList = names.split(",");
// String[] sourceList = sources.split(",");
//获取水印设置
EmrPdfWaterSet emrPdfWaterSet = pdfWaterSetMapper.selectByPrimaryKey(1);
//获取是否打印文本水印
Short printEffective = emrPdfWaterSet.getPrintEffective();
//获取是否打印图片水印
Short printIsImg = emrPdfWaterSet.getPrintIsImg();
for (int i = 0; i < nameList.length; i++) {
//定义图片根目录地址
String rootPath = "";
//组织原图片地址
//原图片地址
String srcPath = nameList[i];
//定义输出地址
String outSrc = "";
//获取项目上下文地址
//不需要水印
String root = "";
String picPath = "";
//判断是否是tif图片
boolean tifFileFlag = checkTifFile(srcPath);
if(tifFileFlag){
String picSrc = WATERPICPATH + patientId + File.separator ;
//目录不存在则创建
if (!new File(picSrc).isDirectory()) {
new File(picSrc).mkdirs();
}
//组织加水印后图片存放地址
picPath = picSrc + nameList[i];
//转换图片输出
//tifToJpg(srcPath,picPath);
outSrc = EMRRECORDJSP + File.separator + "reload" + File.separator + patientId + File.separator + nameList[i];
}else{
//将原图片地址转换成映射地址
//获取盘符并转换映射地址的头部地址
root = selectRootByNotWater(srcPath);
//获取盘符后面的地址
String str1 = srcPath.substring(0, srcPath.indexOf(File.separator));
picPath = srcPath.substring(str1.length() + 1, srcPath.length());
outSrc = EMRRECORDJSP + File.separator + root + picPath;
outs.add(outSrc);
}
Integer value = Math.round((i + 1) * 100 / nameList.length);
printLoadingMap.put(mapKey, value);
}
}
return outs;
}
/** /**
* tif * tif
* @param srcPath * @param srcPath

@ -5,6 +5,7 @@ import com.lowagie.text.Font;
import com.lowagie.text.Image; import com.lowagie.text.Image;
import com.lowagie.text.pdf.*; import com.lowagie.text.pdf.*;
import com.lowagie.text.pdf.codec.TiffImage; import com.lowagie.text.pdf.codec.TiffImage;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -14,6 +15,7 @@ import java.io.*;
import java.net.URL; import java.net.URL;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Iterator;
import java.util.List; import java.util.List;
/** /**
@ -129,6 +131,287 @@ public class Jpg2PdfUtil {
writer.close(); writer.close();
} }
} }
public static boolean check(String file) {
PdfReader pdfReader = null;
try {
File f = new File(file);
if(f.isFile()){
pdfReader = new PdfReader(file);
if (pdfReader.getNumberOfPages() != 0) {
return true;
}
}
} catch (Exception e) {
}finally {
if(null != pdfReader){
pdfReader.close();
}
}
return false;
}
public static void mulFile2One(HttpServletResponse response,List<String> filePaths,String waterMarkName) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//遍历删除,除去损坏,文件不存在,抛异常就是空白页
Iterator<String> iterator = filePaths.iterator();
while (iterator.hasNext()) {
String fileStr = iterator.next();
File file = new File(fileStr);
if(file.isFile()){
boolean flag = check(fileStr);
if(!flag){
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件损坏");
}
}else{
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件不存在");
}
}
if(!filePaths.isEmpty()){
// pdf合并工具类
Document document = null;
PdfCopy copy = null;
try {
document = new Document(new PdfReader(filePaths.get(0)).getPageSize(1));
copy = new PdfCopy(document,response.getOutputStream());
document.open();
for (String file : filePaths) {
PdfReader reader = new PdfReader(file);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PdfReader pdfReader = null;
//判断是否加水印
if (StringUtils.isNotBlank(waterMarkName)) {
setWatermark(bos, reader, waterMarkName, null);
pdfReader = new PdfReader(bos.toByteArray());
}
int n = reader.getNumberOfPages();
for (int j = 1; j <= n; j++) {
document.newPage();
PdfImportedPage page = null;
if (StringUtils.isNotBlank(waterMarkName)) {
page = copy.getImportedPage(pdfReader, j);
} else {
page = copy.getImportedPage(reader, j);
}
copy.addPage(page);
}
if(null != pdfReader){
pdfReader.close();
}
reader.close();
try {
bos.flush();
bos.close();
}catch (Exception e){
//e.printStackTrace();
}
}
}catch (Exception e){
//e.printStackTrace();
}finally {
if(null != document){
document.close();
}
}
}
}
public static void setWatermark(ByteArrayOutputStream bos, PdfReader reader, String waterMarkName, String imgPath){
PdfStamper stamper = null;
try {
stamper = new PdfStamper(reader, bos);
int total = reader.getNumberOfPages() + 1;
PdfContentByte content;
BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
PdfGState gs = new PdfGState();
for (int i = 1; i < total; i++) {
content = stamper.getOverContent(i);// 在内容上方加水印
//加文字水印
if(StringUtils.isNotBlank(waterMarkName)) {
gs.setFillOpacity(0.3f);
gs.setStrokeOpacity(0.3f);
content.setGState(gs);
content.beginText();
content.setColorFill(Color.LIGHT_GRAY);
content.setFontAndSize(base, 50);
content.setTextMatrix(70, 200);
String[] waterMarks = waterMarkName.split("&");
//v:距左 v1:距下 v2:
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[0], 250, 600, 40);
/*content.showTextAligned(Element.ALIGN_CENTER, waterMarks[0], 250, 200, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[0], 800, 600, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[0], 800, 200, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[0], 250, 1100, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[0], 250, 1500, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[0], 800, 1100, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[0], 800, 1500, 40);*/
if(waterMarks.length > 1){
//v:距左 v1:距下 v2:
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[1], 310, 400, 40);
/* content.showTextAligned(Element.ALIGN_CENTER, waterMarks[1], 310, 150, 40);*/
/*content.showTextAligned(Element.ALIGN_CENTER, waterMarks[1], 860, 550, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[1], 860, 150, 40);*/
/* content.showTextAligned(Element.ALIGN_CENTER, waterMarks[1], 300, 900, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[1], 300, 1300, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[1], 800, 900, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarks[1], 800, 1300, 40);*/
}
content.endText();
}
if(StringUtils.isNotBlank(imgPath)){
Image image = Image.getInstance(imgPath);
image.setAbsolutePosition(200, 206); // set the first background
image.scaleToFit(200, 200);
content.addImage(image);
}
content.setColorFill(Color.BLACK);
content.setFontAndSize(base, 8);
}
} catch (IOException | DocumentException e) {
e.printStackTrace();
} finally {
try {
assert stamper != null;
stamper.close();
} catch (DocumentException | IOException e) {
e.printStackTrace();
}
}
}
public static void mulFile2One3(HttpServletResponse response,List<String> filePaths,String filename) {
String waterMarkName="";
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//遍历删除,除去损坏,文件不存在,抛异常就是空白页
Iterator<String> iterator = filePaths.iterator();
while (iterator.hasNext()) {
String fileStr = iterator.next();
File file = new File(fileStr);
if(file.isFile()){
boolean flag = check(fileStr);
if(!flag){
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件损坏");
}
}else{
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件不存在");
}
}
if(!filePaths.isEmpty()){
// pdf合并工具类
Document document = null;
PdfCopy copy = null;
try {
response.reset();
response.setCharacterEncoding("utf-8");
response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "attachment; filename=" + filename + ".pdf");
document = new Document(new PdfReader(filePaths.get(0)).getPageSize(1));
copy = new PdfCopy(document,response.getOutputStream());
document.open();
for (String file : filePaths) {
PdfReader reader = new PdfReader(file);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PdfReader pdfReader = null;
//判断是否加水印
if (StringUtils.isNotBlank(waterMarkName)) {
setWatermark(bos, reader, waterMarkName, null);
pdfReader = new PdfReader(bos.toByteArray());
}
int n = reader.getNumberOfPages();
for (int j = 1; j <= n; j++) {
document.newPage();
PdfImportedPage page = null;
if (StringUtils.isNotBlank(waterMarkName)) {
page = copy.getImportedPage(pdfReader, j);
} else {
page = copy.getImportedPage(reader, j);
}
copy.addPage(page);
}
if(null != pdfReader){
pdfReader.close();
}
reader.close();
try {
bos.flush();
bos.close();
}catch (Exception e){
//e.printStackTrace();
}
}
}catch (Exception e){
//e.printStackTrace();
}finally {
if(null != document){
document.close();
}
}
}
}
public static void mulFile2One2(HttpServletResponse response,List<String> filePaths) {
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//遍历删除,除去损坏,文件不存在,抛异常就是空白页
Iterator<String> iterator = filePaths.iterator();
while (iterator.hasNext()) {
String fileStr = iterator.next();
File file = new File(fileStr);
if(file.isFile()){
boolean flag = check(fileStr);
if(!flag){
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件损坏");
}
}else{
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件不存在");
}
}
if(!filePaths.isEmpty()){
// pdf合并工具类
Document document = null;
PdfCopy copy = null;
try {
response.reset();
response.setCharacterEncoding("utf-8");
response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "attachment; "+"pdf");
document = new Document(new PdfReader(filePaths.get(0)).getPageSize(1));
copy = new PdfCopy(document,response.getOutputStream());
document.open();
for (String file : filePaths) {
PdfReader reader = new PdfReader(file);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PdfReader pdfReader = null;
int n = reader.getNumberOfPages();
if(null != pdfReader){
pdfReader.close();
}
reader.close();
try {
bos.flush();
bos.close();
}catch (Exception e){
//e.printStackTrace();
}
}
}catch (Exception e){
//e.printStackTrace();
}finally {
if(null != document){
document.close();
}
}
}
}
/** /**
* h>whw>hw=h * h>whw>hw=h

@ -3,8 +3,29 @@ package com.emr.vo.commomSearch;
public class CommomTree { public class CommomTree {
private Integer id; private Integer id;
private String title;
private Integer parentId; private Integer parentId;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
private Integer PageCount;
public Integer getPageCount() {
return PageCount;
}
public void setPageCount(Integer pageCount) {
PageCount = pageCount;
}
private String patientId; private String patientId;
private String assortId; private String assortId;
@ -21,6 +42,16 @@ public class CommomTree {
private String source; private String source;
private String PDFPATH;
public String getPDFPATH() {
return PDFPATH;
}
public void setPDFPATH(String PDFPATH) {
this.PDFPATH = PDFPATH;
}
public String getSource() { public String getSource() {
return source; return source;
} }

@ -12,6 +12,8 @@
<result column="Title" property="title" jdbcType="NVARCHAR" /> <result column="Title" property="title" jdbcType="NVARCHAR" />
<result column="flag" property="flag" jdbcType="NVARCHAR" /> <result column="flag" property="flag" jdbcType="NVARCHAR" />
<result column="Sys" property="sys" jdbcType="NVARCHAR" /> <result column="Sys" property="sys" jdbcType="NVARCHAR" />
<result column="assort_name" property="assortName" jdbcType="NVARCHAR" />
</resultMap> </resultMap>
<insert id="insert" parameterType="com.emr.entity.Archive_Detail" > <insert id="insert" parameterType="com.emr.entity.Archive_Detail" >
insert into archive_detail (id, PDF_PATH, MasterID, insert into archive_detail (id, PDF_PATH, MasterID,
@ -103,6 +105,7 @@
AssortID in (${assortIds}) AssortID in (${assortIds})
ORDER BY zd_assort.assort_sort,UpLoadDateTime ORDER BY zd_assort.assort_sort,UpLoadDateTime
</select> </select>
<!--查询pdf路径逗号拼接--> <!--查询pdf路径逗号拼接-->
<select id="selectPdfCountByMasterId" resultMap="BaseResultMap"> <select id="selectPdfCountByMasterId" resultMap="BaseResultMap">
select AssortID, select AssortID,
@ -112,4 +115,39 @@
from archive_detail c where c.MasterID = #{patientId} from archive_detail c where c.MasterID = #{patientId}
group by c.AssortID group by c.AssortID
</select> </select>
<select id="selectPdfPathByPatient2" resultType="com.emr.vo.commomSearch.CommomTree"
parameterType="java.lang.String">
SELECT
archive_detail.PDF_PATH,
archive_detail.MasterID as patient_id,
archive_detail.AssortID as assort_id,
zd_assort.assort_name,
archive_detail.PDF_PATH as scan_page,
archive_detail.Source as source,
archive_detail.PageCount,
archive_detail.Title as title
FROM
archive_detail
LEFT JOIN zd_assort
ON archive_detail.AssortID = zd_assort.assort_id
WHERE
MasterID = #{patientId} and flag != 1
ORDER BY zd_assort.assort_sort,UpLoadDateTime
</select>
<select id="selectPdfPathByPatient3" resultType="com.emr.vo.commomSearch.CommomTree">
SELECT
archive_detail.PDF_PATH,
archive_detail.MasterID as patient_id,
archive_detail.AssortID as assort_id,
zd_assort.assort_name,
archive_detail.PDF_PATH as scan_page,
archive_detail.Source as source
FROM
archive_detail
LEFT JOIN zd_assort
ON archive_detail.AssortID = zd_assort.assort_id
WHERE
MasterID = #{patientIds}
ORDER BY zd_assort.assort_sort,UpLoadDateTime
</select>
</mapper> </mapper>

@ -58,7 +58,7 @@
ON ON
dbo.zd_assort.assort_id = dbo.t_scan_assort.assort_id dbo.zd_assort.assort_id = dbo.t_scan_assort.assort_id
<where> <where>
dbo.commomtable.patient_id in (${patientIds}) dbo.commomtable.patient_id =#{patientIds}
AND t_scan_assort.is_del != 1 AND t_scan_assort.is_del != 1
<if test="assortIds != null"> <if test="assortIds != null">
AND dbo.t_scan_assort.scan_page in (${assortIds}) AND dbo.t_scan_assort.scan_page in (${assortIds})

@ -215,13 +215,13 @@
</div> </div>
<!--表格头--> <!--表格头-->
<input type="hidden" id="tableThNames" <input type="hidden" id="tableThNames"
value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,其他诊断,病理诊断,损伤中毒,是否有手术,病案备注"> value="病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,其他诊断,病理诊断,损伤中毒,是否有手术,病案备注,盘号">
<!--查询字段--> <!--查询字段-->
<input type="hidden" id="englishFields" <input type="hidden" id="englishFields"
value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper,memo,commomtable.file_source"> value="commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper,memo,commomtable.file_source,commomtable.ph">
<!--数据字段--> <!--数据字段-->
<input type="hidden" id="fields" <input type="hidden" id="fields"
value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,otherDiagName,pathologyName,poisoningName,isOper,memo,fileSource"> value="inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,otherDiagName,pathologyName,poisoningName,isOper,memo,ph">
<!--显示字段--> <!--显示字段-->
<input type="hidden" id="fieldCns"> <input type="hidden" id="fieldCns">
<!--查询总行数--> <!--查询总行数-->

File diff suppressed because one or more lines are too long

@ -136,13 +136,14 @@ function onloadPdf(scanPages, sources) {
datType: 'json', datType: 'json',
success: function (data) { success: function (data) {
if (data.code == 0) { if (data.code == 0) {
var str = path + "/commom/getRecordContentBlood?patientId=" + patientId; var str = path + "/commom/getRecordContentBlood?patientId=" + patientId;
$("#iframe1").attr("src", path + "/static/pdfjs/web/viewer1.html?file=" + encodeURIComponent(str)); $("#iframe1").attr("src", path + "/static/pdfjs/web/viewer.html?file=" + encodeURIComponent(str))
var rootPaths = parent.$("#rootPaths").val(); var rootPaths = parent.$("#rootPaths").val();
//加载的图片
var print = $("#print").val(); var print = $("#print").val();
if (scanPages != '' && print == 1) { if (rootPaths!=",") {
selectPrintPic(patientId, rootPaths, scanPages, sources); if (scanPages != '' && print == 1) {
selectPrintPic(patientId, rootPaths, scanPages, sources);
}
} }
} }
} }
@ -181,6 +182,62 @@ function selectPrintPic(patientId, rootPaths, scanPages, sources) {
sources: sources sources: sources
}, },
datType: 'json', datType: 'json',
success: function (data) {
if (data.code == 0) {
var resultList = data.data;
if (null != resultList) {
var img = '';
for (var i = 0; i < resultList.length; i++) {
img += "<img src='" + resultList[i] + "' width='850' height='1190'>";
}
var interval = setInterval(function () {
if ($("#iframeLoad").val() == 1) {
// iframe.contentDocument.getElementById("printContainer1").innerHTML = img;
$("#printPicLoaded").val(1);
// iframe.contentDocument.getElementById("printLoading").style.display = 'none';
// iframe.contentDocument.getElementById("print").style.display = 'block';
clearInterval(interval);
}
}, 200);
}
} else {
toastr.error(data.msg);
}
}
})
//查询进度定时器
var interval1 = setInterval(function () {
$.ajax({
type: 'get',
url: path + "/commom/getPrintPicLoading",
data: {patientId: $("#patientId").val()},
dataType: 'json',
success: function (data) {
if (data.code == 0) {
var value = data.data;
$("#loading").val(value + "%");
if (value == 100) {
//杀死进度定时器
clearInterval(interval1);
}
} else {
toastr.error(data.msg);
}
}
})
}, 100);
}
function selectPrintPic2(patientId, scanPages, sources) {
$.ajax({
type: 'post',
url: path + "/commom/selectPrintPic2",
data: {
patientId: patientId,
names: scanPages,
sources: sources
},
datType: 'json',
success: function (data) { success: function (data) {
if (data.code == 0) { if (data.code == 0) {
var resultList = data.data; var resultList = data.data;
@ -257,7 +314,7 @@ function onloadJpgForPdf() {
message: "确认将左侧树选中的图片下载pdf?", message: "确认将左侧树选中的图片下载pdf?",
operate: function (reselt) { operate: function (reselt) {
if (reselt) { if (reselt) {
var patientId = "'" + $("#patientId").val() + "'"; var patientId = $("#patientId").val();
var assortIds = $("#assortIds").val(); var assortIds = $("#assortIds").val();
var flag = parent.$("#flag").val(); var flag = parent.$("#flag").val();
post(path + '/template/downloadPdfBlood', { post(path + '/template/downloadPdfBlood', {

@ -18,28 +18,28 @@ Adobe CMap resources are covered by their own copyright and license:
http://sourceforge.net/adobe/cmap/wiki/License/ http://sourceforge.net/adobe/cmap/wiki/License/
--> -->
<html dir="ltr" mozdisallowselectionprint moznomarginboxes> <html dir="ltr" mozdisallowselectionprint moznomarginboxes>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate"> <meta name="google" content="notranslate">
<title>PDF.js viewer</title> <title>PDF.js viewer</title>
<link rel="stylesheet" href="viewer.css"/> <link rel="stylesheet" href="viewer.css"/>
<link rel="stylesheet" href="../../../static/bootstrap-3.3.7/bower_components/font-awesome/css/font-awesome.min.css"/> <link rel="stylesheet" href="../../../static/bootstrap-3.3.7/bower_components/font-awesome/css/font-awesome.min.css"/>
<script src="compatibility.js"></script> <script src="compatibility.js"></script>
<!-- This snippet is used in production (included from viewer.html) --> <!-- This snippet is used in production (included from viewer.html) -->
<link rel="resource" type="application/l10n" href="locale/locale.properties"/> <link rel="resource" type="application/l10n" href="locale/locale.properties"/>
<link rel="shortcut icon" href="/emr_medical_record/favicon.ico"> <link rel="shortcut icon" href="../../js/favicon.ico">
<script type="text/javascript" src="../../js/jquery-3.3.1.js"></script> <script type="text/javascript" src="../../js/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../bootstrap-3.3.7/bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script type="text/javascript" src="../../bootstrap-3.3.7/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="l10n.js"></script> <script src="l10n.js"></script>
<script src="../build/pdf.js"></script> <script src="../build/pdf.js?time=2020-08-21"></script>
<script src="debugger.js"></script> <script src="debugger.js"></script>
<script src="viewer.js"></script> <script src="viewer.js?time=2020-08-27"></script>
<style> <style>
.loading { .loading {
@ -61,211 +61,216 @@ http://sourceforge.net/adobe/cmap/wiki/License/
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
} }
.fullScreamBtn{ .fullScreamBtn{
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
width: 150px; width: 150px;
height: 30px; height: 30px;
border-radius: 5px; border-radius: 5px;
background: #898989; background: #898989;
position: fixed; position: fixed;
bottom: 2px; bottom: 2px;
left: calc(100vw / 2 - 75px); left: calc(100vw / 2 - 75px);
z-index: 999; z-index: 999;
transition: all 0.5s; transition: all 0.5s;
} }
.fullScreamBtn i{ .fullScreamBtn i{
line-height: 30px; line-height: 30px;
color: white; color: white;
margin-right: 8px; margin-right: 8px;
cursor: pointer; cursor: pointer;
} }
.fullScreamBtn i:first-child{ .fullScreamBtn i:first-child{
margin-left: 11px; margin-left: 11px;
} }
.page:hover~.fullScreamBtn,.fullScreamBtn:hover{ .page:hover~.fullScreamBtn,.fullScreamBtn:hover{
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
} }
</style> </style>
</head> </head>
<body tabindex="1" class="loadingInProgress" onkeydown="disabledPrint()"> <body tabindex="1" class="loadingInProgress" onkeydown="disabledPrint()">
<div id="myModal" class="modal fade" data-keyboard="false" <div id="myModal" class="modal fade" data-keyboard="false"
data-backdrop="static" data-role="dialog" data-backdrop="static" data-role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true"> aria-labelledby="myModalLabel" aria-hidden="true">
<div id="loading" class="loading">加载中。。。</div> <div id="loading" class="loading">加载中。。。</div>
</div> </div>
<div id="outerContainer"> <div id="outerContainer">
<div id="sidebarContainer"> <div id="sidebarContainer">
<div id="toolbarSidebar"> <div id="toolbarSidebar">
<div class="splitToolbarButton toggled"> <div class="splitToolbarButton toggled">
<button id="viewThumbnail" class="toolbarButton group toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs"> <button id="viewThumbnail" class="toolbarButton group toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
<span data-l10n-id="thumbs_label">Thumbnails</span> <span data-l10n-id="thumbs_label">Thumbnails</span>
</button> </button>
<button id="viewOutline" class="toolbarButton group" title="Show Document Outline" tabindex="3" data-l10n-id="outline"> <button id="viewOutline" class="toolbarButton group" title="Show Document Outline" tabindex="3" data-l10n-id="outline">
<span data-l10n-id="outline_label">Document Outline</span> <span data-l10n-id="outline_label">Document Outline</span>
</button> </button>
<button id="viewAttachments" class="toolbarButton group" title="Show Attachments" tabindex="4" data-l10n-id="attachments"> <button id="viewAttachments" class="toolbarButton group" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
<span data-l10n-id="attachments_label">Attachments</span> <span data-l10n-id="attachments_label">Attachments</span>
</button> </button>
</div> </div>
</div> </div>
<div id="sidebarContent"> <div id="sidebarContent">
<div id="thumbnailView"> <div id="thumbnailView">
</div> </div>
<div id="outlineView" class="hidden"> <div id="outlineView" class="hidden">
</div> </div>
<div id="attachmentsView" class="hidden"> <div id="attachmentsView" class="hidden">
</div> </div>
</div> </div>
</div> <!-- sidebarContainer --> </div> <!-- sidebarContainer -->
<div id="mainContainer"> <div id="mainContainer">
<div class="findbar hidden doorHanger hiddenSmallView" id="findbar"> <div class="findbar hidden doorHanger hiddenSmallView" id="findbar">
<label for="findInput" class="toolbarLabel" data-l10n-id="find_label">Find:</label> <label for="findInput" class="toolbarLabel" data-l10n-id="find_label">Find:</label>
<input id="findInput" class="toolbarField" tabindex="91"> <input id="findInput" class="toolbarField" tabindex="91">
<div class="splitToolbarButton"> <div class="splitToolbarButton">
<button class="toolbarButton findPrevious" title="" id="findPrevious" tabindex="92" data-l10n-id="find_previous"> <button class="toolbarButton findPrevious" title="" id="findPrevious" tabindex="92" data-l10n-id="find_previous">
<span data-l10n-id="find_previous_label">Previous</span> <span data-l10n-id="find_previous_label">Previous</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton findNext" title="" id="findNext" tabindex="93" data-l10n-id="find_next">
<span data-l10n-id="find_next_label">Next</span>
</button>
</div>
<input type="checkbox" id="findHighlightAll" class="toolbarField">
<label for="findHighlightAll" class="toolbarLabel" tabindex="94" data-l10n-id="find_highlight">Highlight all</label>
<input type="checkbox" id="findMatchCase" class="toolbarField">
<label for="findMatchCase" class="toolbarLabel" tabindex="95" data-l10n-id="find_match_case_label">Match case</label>
<span id="findMsg" class="toolbarLabel"></span>
</div> <!-- findbar -->
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
<div id="secondaryToolbarButtonContainer">
<button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
<!--<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span>
</button>-->
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span>
</button>
<a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span>
</a>
<div class="horizontalToolbarSeparator visibleLargeView"></div>
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
<span data-l10n-id="first_page_label">Go to First Page</span>
</button>
<button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
<span data-l10n-id="last_page_label">Go to Last Page</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
</button>
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<button id="toggleHandTool" class="secondaryToolbarButton handTool" title="Enable hand tool" tabindex="60" data-l10n-id="hand_tool_enable">
<span data-l10n-id="hand_tool_enable_label">Enable hand tool</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<!--<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="61" data-l10n-id="document_properties">
<span data-l10n-id="document_properties_label">Document Properties…</span>
</button>-->
</div>
</div> <!-- secondaryToolbar -->
<div class="toolbar">
<div id="toolbarContainer">
<div id="toolbarViewer">
<div id="toolbarViewerLeft">
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
</button> </button>
<div class="splitToolbarButtonSeparator"></div> <div class="toolbarButtonSpacer"></div>
<button class="toolbarButton findNext" title="" id="findNext" tabindex="93" data-l10n-id="find_next"> <button id="viewFind" class="toolbarButton group hiddenSmallView" title="Find in Document" tabindex="12" data-l10n-id="findbar">
<span data-l10n-id="find_next_label">Next</span> <span data-l10n-id="findbar_label">Find</span>
</button> </button>
<div class="splitToolbarButton">
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
<span data-l10n-id="previous_label">Previous</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
<span data-l10n-id="next_label">Next</span>
</button>
</div>
<label id="pageNumberLabel" class="toolbarLabel" for="pageNumber" data-l10n-id="page_label">Page: </label>
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" tabindex="15">
<span id="numPages" class="toolbarLabel"></span>
</div> </div>
<input type="checkbox" id="findHighlightAll" class="toolbarField"> <div id="toolbarViewerRight">
<label for="findHighlightAll" class="toolbarLabel" tabindex="94" data-l10n-id="find_highlight">Highlight all</label> <button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
<input type="checkbox" id="findMatchCase" class="toolbarField">
<label for="findMatchCase" class="toolbarLabel" tabindex="95" data-l10n-id="find_match_case_label">Match case</label>
<span id="findMsg" class="toolbarLabel"></span>
</div> <!-- findbar -->
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
<div id="secondaryToolbarButtonContainer">
<button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span> <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button> </button>
<!--<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span>
</button>-->
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download"> <button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
<span data-l10n-id="download_label">Download</span> <span data-l10n-id="print_label">Print</span>
</button> </button>
<a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span>
</a>
<div class="horizontalToolbarSeparator visibleLargeView"></div> <!--<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span>
</button>-->
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
<span data-l10n-id="first_page_label">Go to First Page</span>
</button>
<button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
<span data-l10n-id="last_page_label">Go to Last Page</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw"> <!--<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span> <span data-l10n-id="download_label">Download</span>
</button> </button>-->
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw"> <!-- <a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span> <span data-l10n-id="bookmark_label">Current View</span>
</button> </a>-->
<div class="horizontalToolbarSeparator"></div> <div class="verticalToolbarSeparator hiddenSmallView"></div>
<button id="toggleHandTool" class="secondaryToolbarButton handTool" title="Enable hand tool" tabindex="60" data-l10n-id="hand_tool_enable"> <button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools">
<span data-l10n-id="hand_tool_enable_label">Enable hand tool</span> <span data-l10n-id="tools_label">Tools</span>
</button> </button>
<div class="horizontalToolbarSeparator"></div>
<!--<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="61" data-l10n-id="document_properties">
<span data-l10n-id="document_properties_label">Document Properties…</span>
</button>-->
</div> </div>
</div> <!-- secondaryToolbar --> <div class="outerCenter">
<div class="innerCenter" id="toolbarViewerMiddle">
<div class="toolbar"> <div class="splitToolbarButton">
<div id="toolbarContainer"> <button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
<div id="toolbarViewer"> <span data-l10n-id="zoom_out_label">Zoom Out</span>
<div id="toolbarViewerLeft">
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
</button>
<div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton group hiddenSmallView" title="Find in Document" tabindex="12" data-l10n-id="findbar">
<span data-l10n-id="findbar_label">Find</span>
</button> </button>
<div class="splitToolbarButton"> <div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous"> <button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
<span data-l10n-id="previous_label">Previous</span> <span data-l10n-id="zoom_in_label">Zoom In</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
<span data-l10n-id="next_label">Next</span>
</button>
</div>
<label id="pageNumberLabel" class="toolbarLabel" for="pageNumber" data-l10n-id="page_label">Page: </label>
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" tabindex="15">
<span id="numPages" class="toolbarLabel"></span>
</div>
<div id="toolbarViewerRight">
<button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
<!--<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span>
</button>-->
<!--<button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span>
</button>-->
<!-- <a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span>
</a>-->
<div class="verticalToolbarSeparator hiddenSmallView"></div>
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools">
<span data-l10n-id="tools_label">Tools</span>
</button> </button>
</div> </div>
<div class="outerCenter"> <span id="scaleSelectContainer" class="dropdownToolbarButton">
<div class="innerCenter" id="toolbarViewerMiddle">
<div class="splitToolbarButton">
<button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
<span data-l10n-id="zoom_out_label">Zoom Out</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
<span data-l10n-id="zoom_in_label">Zoom In</span>
</button>
</div>
<span id="scaleSelectContainer" class="dropdownToolbarButton">
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom"> <select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option> <option id="pageAutoOption" title="" value="auto" data-l10n-id="page_scale_auto">Automatic Zoom</option>
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option> <option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Fit Page</option> <option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Fit Page</option>
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Full Width</option> <option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Full Width</option>
<option id="customScaleOption" title="" value="custom"></option> <option id="customScaleOption" title="" value="custom"></option>
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option> <option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option> <option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option> <option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }' selected="selected">100%</option>
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option> <option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option> <option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option> <option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
@ -273,183 +278,183 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option> <option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
</select> </select>
</span> </span>
</div>
</div>
</div> </div>
<div id="loadingBar"> </div>
<div class="progress"> </div>
<div class="glimmer"> <div id="loadingBar">
</div> <div class="progress">
</div> <div class="glimmer">
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<menu type="context" id="viewerContextMenu"> <menu type="context" id="viewerContextMenu">
<menuitem id="contextFirstPage" label="First Page" <menuitem id="contextFirstPage" label="First Page"
data-l10n-id="first_page"></menuitem> data-l10n-id="first_page"></menuitem>
<menuitem id="contextLastPage" label="Last Page" <menuitem id="contextLastPage" label="Last Page"
data-l10n-id="last_page"></menuitem> data-l10n-id="last_page"></menuitem>
<menuitem id="contextPageRotateCw" label="Rotate Clockwise" <menuitem id="contextPageRotateCw" label="Rotate Clockwise"
data-l10n-id="page_rotate_cw"></menuitem> data-l10n-id="page_rotate_cw"></menuitem>
<menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise" <menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise"
data-l10n-id="page_rotate_ccw"></menuitem> data-l10n-id="page_rotate_ccw"></menuitem>
</menu> </menu>
<div id="viewerContainer" tabindex="0"> <div id="viewerContainer" tabindex="0">
<div id="viewer" class="pdfViewer"></div> <div id="viewer" class="pdfViewer"></div>
</div> </div>
<div id="errorWrapper" hidden='true'> <div id="errorWrapper" hidden='true'>
<div id="errorMessageLeft"> <div id="errorMessageLeft">
<span id="errorMessage"></span> <span id="errorMessage"></span>
<button id="errorShowMore" data-l10n-id="error_more_info"> <button id="errorShowMore" data-l10n-id="error_more_info">
More Information More Information
</button> </button>
<button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'> <button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
Less Information Less Information
</button> </button>
</div> </div>
<div id="errorMessageRight"> <div id="errorMessageRight">
<button id="errorClose" data-l10n-id="error_close"> <button id="errorClose" data-l10n-id="error_close">
Close Close
</button> </button>
</div> </div>
<div class="clearBoth"></div> <div class="clearBoth"></div>
<textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea> <textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
</div> </div>
</div> <!-- mainContainer --> </div> <!-- mainContainer -->
<div id="overlayContainer" class="hidden"> <div id="overlayContainer" class="hidden">
<div id="passwordOverlay" class="container hidden"> <div id="passwordOverlay" class="container hidden">
<div class="dialog"> <div class="dialog">
<div class="row"> <div class="row">
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p> <p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
</div>
<div class="row">
<input type="password" id="password" class="toolbarField" />
</div>
<div class="buttonRow">
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
</div>
</div>
</div> </div>
<div id="documentPropertiesOverlay" class="container hidden"> <div class="row">
<div class="dialog"> <input type="password" id="password" class="toolbarField" />
<div class="row"> </div>
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p> <div class="buttonRow">
</div> <button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
<div class="row"> <button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p> </div>
</div> </div>
<div class="separator"></div> </div>
<div class="row"> <div id="documentPropertiesOverlay" class="container hidden">
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p> <div class="dialog">
</div> <div class="row">
<div class="row"> <span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p> </div>
</div> <div class="row">
<div class="row"> <span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p> </div>
</div> <div class="separator"></div>
<div class="row"> <div class="row">
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p> <span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
</div>
<div class="separator"></div>
<div class="row">
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
</div>
<div class="buttonRow">
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
</div>
</div>
</div> </div>
</div> <!-- overlayContainer --> <div class="row">
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
</div>
<div class="separator"></div>
<div class="row">
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
</div>
<div class="buttonRow">
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
</div>
</div>
</div>
</div> <!-- overlayContainer -->
</div> <!-- outerContainer --> </div> <!-- outerContainer -->
<div id="printContainer"></div> <div id="printContainer"></div>
<div id="mozPrintCallback-shim" hidden> <div id="mozPrintCallback-shim" hidden>
<style> <style>
@media print { @media print {
#printContainer div { #printContainer div {
page-break-after: always; page-break-after: always;
page-break-inside: avoid; page-break-inside: avoid;
} }
} }
</style> </style>
<style scoped> <style scoped>
#mozPrintCallback-shim { #mozPrintCallback-shim {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
height: 100%; height: 100%;
width: 100%; width: 100%;
z-index: 9999999; z-index: 9999999;
display: block; display: block;
text-align: center; text-align: center;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
} }
#mozPrintCallback-shim[hidden] { #mozPrintCallback-shim[hidden] {
display: none; display: none;
} }
@media print { @media print {
#mozPrintCallback-shim { #mozPrintCallback-shim {
display: none; display: none;
} }
} }
#mozPrintCallback-shim .mozPrintCallback-dialog-box { #mozPrintCallback-shim .mozPrintCallback-dialog-box {
display: inline-block; display: inline-block;
margin: -50px auto 0; margin: -50px auto 0;
position: relative; position: relative;
top: 45%; top: 45%;
left: 0; left: 0;
min-width: 220px; min-width: 220px;
max-width: 400px; max-width: 400px;
padding: 9px; padding: 9px;
border: 1px solid hsla(0, 0%, 0%, .5); border: 1px solid hsla(0, 0%, 0%, .5);
border-radius: 2px; border-radius: 2px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
background-color: #474747; background-color: #474747;
color: hsl(0, 0%, 85%); color: hsl(0, 0%, 85%);
font-size: 16px; font-size: 16px;
line-height: 20px; line-height: 20px;
} }
#mozPrintCallback-shim .progress-row { #mozPrintCallback-shim .progress-row {
clear: both; clear: both;
padding: 1em 0; padding: 1em 0;
} }
#mozPrintCallback-shim progress { #mozPrintCallback-shim progress {
width: 100%; width: 100%;
} }
#mozPrintCallback-shim .relative-progress { #mozPrintCallback-shim .relative-progress {
clear: both; clear: both;
float: right; float: right;
} }
#mozPrintCallback-shim .progress-actions { #mozPrintCallback-shim .progress-actions {
clear: both; clear: both;
} }
</style> </style>
<div class="mozPrintCallback-dialog-box"> <div class="mozPrintCallback-dialog-box">
&lt;!&ndash; TODO: Localise the following strings &ndash;&gt; &lt;!&ndash; TODO: Localise the following strings &ndash;&gt;
@ -464,6 +469,6 @@ http://sourceforge.net/adobe/cmap/wiki/License/
</div> </div>
</div> </div>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save