|
|
|
@ -828,6 +828,10 @@ public class CollectController extends Controller {
|
|
|
|
|
if (type_id == 2) {
|
|
|
|
|
String pdfPath = excelPath.replace(".xlsx", ".pdf");
|
|
|
|
|
AsposeUtil.xls2pdf(excelPath, pdfPath);
|
|
|
|
|
/**
|
|
|
|
|
* 解决java.io.IOException: UT010029: Stream is closed报错
|
|
|
|
|
* 由于HttpServlet的request和response里的流都只能读写一次,关掉就没有了, 所以不能使用该方法
|
|
|
|
|
*/
|
|
|
|
|
OutputStream outputStream = getResponse().getOutputStream();
|
|
|
|
|
outputStream.write(FileUtil.readBytes(pdfPath));
|
|
|
|
|
outputStream.flush();
|
|
|
|
|