mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-12 17:52:13 +02:00
Change PDF load Get Info on PDF to readonly
This commit is contained in:
parent
ccbde393f1
commit
ed62e2e185
@ -126,7 +126,8 @@ public class GetInfoOnPDF {
|
||||
@Operation(summary = "Summary here", description = "desc. Input:PDF Output:JSON Type:SISO")
|
||||
public ResponseEntity<byte[]> getPdfInfo(@ModelAttribute PDFFile request) throws IOException {
|
||||
MultipartFile inputFile = request.getFileInput();
|
||||
try (PDDocument pdfBoxDoc = pdfDocumentFactory.load(inputFile); ) {
|
||||
boolean readonly = true;
|
||||
try (PDDocument pdfBoxDoc = pdfDocumentFactory.load(inputFile, readonly); ) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
ObjectNode jsonOutput = objectMapper.createObjectNode();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user