package com.example.demo.controller; import org.apache.pdfbox.Loader; import org.apache.pdfbox.pdmodel.PDDocument; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.io.File; @RequestMapping("/claimManage") @RestController public class PdfController { public void getPatentPictures(String pdfUrl) throws Exception { PDDocument document = Loader.loadPDF(new File("D:\\demo\\file2\\202410725352_CN118294200A.pdf")); } }