Skip to content

Commit

Permalink
numbers name
Browse files Browse the repository at this point in the history
  • Loading branch information
Frooodle committed Jul 24, 2023
1 parent 9e65563 commit 29dab5e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,8 @@ public ResponseEntity<byte[]> addPageNumbers(
pdfDoc.close();
byte[] resultBytes = baos.toByteArray();

return ResponseEntity.ok()
.header("Content-Type", "application/pdf; charset=UTF-8")
.header("Content-Disposition", "inline; filename=" + URLEncoder.encode(file.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_numbersAdded.pdf", "UTF-8"))
.body(resultBytes);
return WebResponseUtils.bytesToWebResponse(resultBytes, URLEncoder.encode(file.getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_numbersAdded.pdf", "UTF-8"), MediaType.APPLICATION_PDF);

}


Expand Down

0 comments on commit 29dab5e

Please sign in to comment.