首页>代码>spring boot整合icepdf实现pdf转图片>/springboot-pdf2Image/src/main/java/com/simon/springbootpdftoimage/controller/PdfController.java
package com.simon.springbootpdftoimage.controller; import com.simon.springbootpdftoimage.util.ImageUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; /** * @author Simon * @description: 用于处理Pdf相关的请求 */ @Controller @RequestMapping("pdf") public class PdfController { @PostMapping("to/image") public void pdfToImage(@RequestParam("file") MultipartFile file, HttpServletResponse response) throws Exception { ImageUtils.pdfToImage(file, response); } }
最近下载更多