public void methodName(HttpServletResponse response) throws IOException {
response.setContentType("application/vnd.ms-powerpoint");
response.setHeader("Content-Disposition", "attachment;filename="+filename+"");
Presentation pres=new Presentation();
***
pres.save(response.getOutputStream(), SaveFormat.Pptx);
}
参考:
网友评论