1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-04 23:10:11 +01:00

Merge pull request #227 from jordyjordy/fix-imgtopdf-typo

fix typo in img conversion filename
This commit is contained in:
Anthony Stirling 2023-06-05 19:42:48 +01:00 committed by GitHub
commit 987d9b0502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ public class ConvertImgPDFController {
boolean autoRotate) throws IOException {
// Convert the file to PDF and get the resulting bytes
byte[] bytes = PdfUtils.imageToPdf(file, stretchToFit, autoRotate, colorType);
return WebResponseUtils.bytesToWebResponse(bytes, file[0].getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_coverted.pdf");
return WebResponseUtils.bytesToWebResponse(bytes, file[0].getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_converted.pdf");
}
private String getMediaType(String imageFormat) {