JAVA实现多个PDF文件压缩下载
@RequestMapping(params = "batchExports")
public void batchExportPDFs(HttpServletRequest req, HttpServletResponse resp) throws IOException, DocumentException {
//获取各个文件路径
List<String> files = new ArrayList<>();
//json转list
List<Map<String, String>> list = (List<Map<String, String>>) JSONArray.parse(req.getParameter("ids"));
//遍历list,返回文件
for (Map<String, String> map : list) {
String path = exportPDF(req,map.get("caseId"), map.get("did"));
files.add(path);
}
//创建压缩文件需要的空的zip包
String zipBasePath= req.