mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-02-21 00:17:05 +01:00
numbers name
This commit is contained in:
parent
9e655631b4
commit
29dab5e47d
@ -165,10 +165,8 @@ public class PageNumbersController {
|
|||||||
pdfDoc.close();
|
pdfDoc.close();
|
||||||
byte[] resultBytes = baos.toByteArray();
|
byte[] resultBytes = baos.toByteArray();
|
||||||
|
|
||||||
return ResponseEntity.ok()
|
return WebResponseUtils.bytesToWebResponse(resultBytes, URLEncoder.encode(file.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_numbersAdded.pdf", "UTF-8"), MediaType.APPLICATION_PDF);
|
||||||
.header("Content-Type", "application/pdf; charset=UTF-8")
|
|
||||||
.header("Content-Disposition", "inline; filename=" + URLEncoder.encode(file.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_numbersAdded.pdf", "UTF-8"))
|
|
||||||
.body(resultBytes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user