Aspose 写入输出流

2019-07-25  本文已影响0人  暗夜行者

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);    

}

参考:

https://stackoverflow.com/questions/43036390/downloading-ppt-file-using-spring-mvc-and-apache-poi?rq=1

上一篇下一篇

猜你喜欢

热点阅读