From 5b3858ba293e16bfce51f1dea81f898a72640c35 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 17 Sep 2023 21:17:13 +0100 Subject: [PATCH 1/2] image changes and cert fix --- .../converters/ConvertImgPDFController.java | 4 ++-- .../api/converters/ConvertToPdfRequest.java | 7 +++++-- .../software/SPDF/utils/PdfUtils.java | 21 +++++++++++++------ src/main/resources/messages_ar_AR.properties | 8 ++++++- src/main/resources/messages_ca_CA.properties | 8 ++++++- src/main/resources/messages_de_DE.properties | 8 ++++++- src/main/resources/messages_en_GB.properties | 5 ++++- src/main/resources/messages_en_US.properties | 8 ++++++- src/main/resources/messages_es_ES.properties | 9 +++++++- src/main/resources/messages_eu_ES.properties | 8 ++++++- src/main/resources/messages_fr_FR.properties | 10 +++++++-- src/main/resources/messages_it_IT.properties | 8 ++++++- src/main/resources/messages_ja_JP.properties | 8 ++++++- src/main/resources/messages_ko_KR.properties | 8 ++++++- src/main/resources/messages_nl_NL.properties | 8 ++++++- src/main/resources/messages_pl_PL.properties | 8 ++++++- src/main/resources/messages_pt_BR.properties | 8 ++++++- src/main/resources/messages_ro_RO.properties | 8 ++++++- src/main/resources/messages_ru_RU.properties | 8 ++++++- src/main/resources/messages_sv_SE.properties | 8 ++++++- src/main/resources/messages_zh_CN.properties | 8 ++++++- .../templates/convert/img-to-pdf.html | 14 +++++++++---- .../templates/security/cert-sign.html | 6 +++--- 23 files changed, 160 insertions(+), 36 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertImgPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertImgPDFController.java index 6c100519..0064a3ab 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertImgPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/converters/ConvertImgPDFController.java @@ -79,12 +79,12 @@ public class ConvertImgPDFController { description = "This endpoint converts one or more images to a PDF file. Users can specify whether to stretch the images to fit the PDF page, and whether to automatically rotate the images. Input:Image Output:PDF Type:SISO?") public ResponseEntity convertToPdf(@ModelAttribute ConvertToPdfRequest request) throws IOException { MultipartFile[] file = request.getFileInput(); - boolean stretchToFit = request.isStretchToFit(); + String fitOption = request.getFitOption(); String colorType = request.getColorType(); boolean autoRotate = request.isAutoRotate(); // Convert the file to PDF and get the resulting bytes - byte[] bytes = PdfUtils.imageToPdf(file, stretchToFit, autoRotate, colorType); + byte[] bytes = PdfUtils.imageToPdf(file, fitOption, autoRotate, colorType); return WebResponseUtils.bytesToWebResponse(bytes, file[0].getOriginalFilename().replaceFirst("[.][^.]+$", "") + "_converted.pdf"); } diff --git a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java index dba2dc5e..37df6f9e 100644 --- a/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java +++ b/src/main/java/stirling/software/SPDF/model/api/converters/ConvertToPdfRequest.java @@ -13,8 +13,11 @@ public class ConvertToPdfRequest { @Schema(description = "The input images to be converted to a PDF file") private MultipartFile[] fileInput; - @Schema(description = "Whether to stretch the images to fit the PDF page or maintain the aspect ratio", example = "false") - private boolean stretchToFit; + @Schema(description = "Option to determine how the image will fit onto the page", + allowableValues = { "fillPage", "fitDocumentToImage", "maintainAspectRatio" }) + private String fitOption; + + @Schema(description = "The color type of the output image(s)", allowableValues = {"color", "greyscale", "blackwhite"}) private String colorType; diff --git a/src/main/java/stirling/software/SPDF/utils/PdfUtils.java b/src/main/java/stirling/software/SPDF/utils/PdfUtils.java index c5296191..2f57fe10 100644 --- a/src/main/java/stirling/software/SPDF/utils/PdfUtils.java +++ b/src/main/java/stirling/software/SPDF/utils/PdfUtils.java @@ -248,7 +248,7 @@ public class PdfUtils { throw e; } } - public static byte[] imageToPdf(MultipartFile[] files, boolean stretchToFit, boolean autoRotate, String colorType) throws IOException { + public static byte[] imageToPdf(MultipartFile[] files, String fitOption, boolean autoRotate, String colorType) throws IOException { try (PDDocument doc = new PDDocument()) { for (MultipartFile file : files) { String contentType = file.getContentType(); @@ -261,7 +261,7 @@ public class PdfUtils { BufferedImage pageImage = reader.read(i); BufferedImage convertedImage = ImageProcessingUtils.convertColorType(pageImage, colorType); PDImageXObject pdImage = LosslessFactory.createFromImage(doc, convertedImage); - addImageToDocument(doc, pdImage, stretchToFit, autoRotate); + addImageToDocument(doc, pdImage, fitOption, autoRotate); } } else { File imageFile = Files.createTempFile("image", ".png").toFile(); @@ -279,7 +279,7 @@ public class PdfUtils { } else { pdImage = LosslessFactory.createFromImage(doc, convertedImage); } - addImageToDocument(doc, pdImage, stretchToFit, autoRotate); + addImageToDocument(doc, pdImage, fitOption, autoRotate); } catch (IOException e) { logger.error("Error writing image to file: {}", imageFile.getAbsolutePath(), e); throw e; @@ -295,12 +295,20 @@ public class PdfUtils { } } - private static void addImageToDocument(PDDocument doc, PDImageXObject image, boolean stretchToFit, boolean autoRotate) throws IOException { + private static void addImageToDocument(PDDocument doc, PDImageXObject image, String fitOption, boolean autoRotate) throws IOException { boolean imageIsLandscape = image.getWidth() > image.getHeight(); PDRectangle pageSize = PDRectangle.A4; + + System.out.println(fitOption); + if (autoRotate && imageIsLandscape) { pageSize = new PDRectangle(pageSize.getHeight(), pageSize.getWidth()); } + + if ("fitDocumentToImage".equals(fitOption)) { + pageSize = new PDRectangle(image.getWidth(), image.getHeight()); + } + PDPage page = new PDPage(pageSize); doc.addPage(page); @@ -308,9 +316,9 @@ public class PdfUtils { float pageHeight = page.getMediaBox().getHeight(); try (PDPageContentStream contentStream = new PDPageContentStream(doc, page)) { - if (stretchToFit) { + if ("fillPage".equals(fitOption) || "fitDocumentToImage".equals(fitOption)) { contentStream.drawImage(image, 0, 0, pageWidth, pageHeight); - } else { + } else if ("maintainAspectRatio".equals(fitOption)) { float imageAspectRatio = (float) image.getWidth() / (float) image.getHeight(); float pageAspectRatio = pageWidth / pageHeight; @@ -331,6 +339,7 @@ public class PdfUtils { } } + public static byte[] overlayImage(byte[] pdfBytes, byte[] imageBytes, float x, float y, boolean everyPage) throws IOException { PDDocument document = PDDocument.load(new ByteArrayInputStream(pdfBytes)); diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index a4d97973..87190f5f 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -665,7 +665,13 @@ split.submit=Split imageToPDF.title=صورة إلى PDF imageToPDF.header=صورة إلى PDF imageToPDF.submit=تحول -imageToPDF.selectText.1=\u062A\u0645\u062F\u062F \u0644\u0644\u0645\u0644\u0627\u0621\u0645\u0629 +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=\u062F\u0648\u0631\u0627\u0646 PDF \u062A\u0644\u0642\u0627\u0626\u064A\u064B\u0627 imageToPDF.selectText.3=\u0627\u0644\u0645\u0646\u0637\u0642 \u0627\u0644\u0645\u062A\u0639\u062F\u062F \u0644\u0644\u0645\u0644\u0641\u0627\u062A (\u0645\u0641\u0639\u0651\u0644 \u0641\u0642\u0637 \u0625\u0630\u0627 \u0643\u0646\u062A \u062A\u0639\u0645\u0644 \u0645\u0639 \u0635\u0648\u0631 \u0645\u062A\u0639\u062F\u062F\u0629) imageToPDF.selectText.4=\u062F\u0645\u062C \u0641\u064A \u0645\u0644\u0641 PDF \u0648\u0627\u062D\u062F diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index d4141c67..51f0e33f 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -665,7 +665,13 @@ split.submit=Divideix imageToPDF.title=Imatge a PDF imageToPDF.header=Imatge a PDF imageToPDF.submit=Converteix -imageToPDF.selectText.1=Estirar per adaptar +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Auto rota PDF imageToPDF.selectText.3=Lògica de diversos fitxers (només està activada si es treballa amb diverses imatges) imageToPDF.selectText.4=Combina en un únic PDF diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 88fa9ad7..26e61b54 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -665,7 +665,13 @@ split.submit=Aufteilen imageToPDF.title=Bild zu PDF imageToPDF.header=Bild zu PDF imageToPDF.submit=Umwandeln -imageToPDF.selectText.1=Auf Seite strecken +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDF automatisch drehen imageToPDF.selectText.3=Mehrere Dateien verarbeiten (nur aktiv, wenn Sie mit mehreren Bildern arbeiten) imageToPDF.selectText.4=In ein einziges PDF zusammenführen diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index 7abd7dfb..6d6a7aad 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -665,7 +665,10 @@ split.submit=Split imageToPDF.title=Image to PDF imageToPDF.header=Image to PDF imageToPDF.submit=Convert -imageToPDF.selectText.1=Stretch to fit +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Auto rotate PDF imageToPDF.selectText.3=Multi file logic (Only enabled if working with multiple images) imageToPDF.selectText.4=Merge into single PDF diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 3c8ad9f8..9ee15dbf 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -665,7 +665,13 @@ split.submit=Split imageToPDF.title=Image to PDF imageToPDF.header=Image to PDF imageToPDF.submit=Convert -imageToPDF.selectText.1=Stretch to fit +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Auto rotate PDF imageToPDF.selectText.3=Multi file logic (Only enabled if working with multiple images) imageToPDF.selectText.4=Merge into single PDF diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 533ea230..9aef8747 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -307,6 +307,7 @@ home.MarkdownToPDF.title=Markdown a PDF home.MarkdownToPDF.desc=Convierte cualquier archivo Markdown a PDF MarkdownToPDF.tags=margen,contenido web,transformación,convertir + home.getPdfInfo.title=Obtener toda la información en PDF home.getPdfInfo.desc=Obtiene toda la información posible de archivos PDF getPdfInfo.tags=información,datos,stats,estadísticas @@ -664,7 +665,13 @@ split.submit=Dividir imageToPDF.title=Imagen a PDF imageToPDF.header=Imagen a PDF imageToPDF.submit=Convertir -imageToPDF.selectText.1=Estirar para ajustar +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Rotación automática del PDF imageToPDF.selectText.3=Lógica de archivos múltiples (únicamente activado si funciona con multiples imágenes) imageToPDF.selectText.4=Unir en un único archivo PDF diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index 2e2540be..a7e88caa 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -665,7 +665,13 @@ split.submit=Zatitu imageToPDF.title=Irudia PDF bihurtu imageToPDF.header=Irudia PDF bihurtu imageToPDF.submit=Bihurtu -imageToPDF.selectText.1=Zabaldu doitzeko +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDFaren errotazio automatikoa imageToPDF.selectText.3=Fitxategi askoren logika (gaituta bakarrik zenbait irudirekin ari denean) imageToPDF.selectText.4=Elkartu PDF bakar batean diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 765afae4..2936a706 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -665,7 +665,13 @@ split.submit=Diviser imageToPDF.title=Image en PDF imageToPDF.header=Image en PDF imageToPDF.submit=Convertir -imageToPDF.selectText.1=Étirer pour adapter +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Rotation automatique du PDF imageToPDF.selectText.3=Logique multi-fichiers (uniquement activée si vous travaillez avec plusieurs images) imageToPDF.selectText.4=Fusionner en un seul PDF @@ -749,7 +755,7 @@ removePassword.submit=Supprimer #changeMetadata -changeMetadata.title=Modifier les métadonnées +changeMetadata.title=Titre changeMetadata.header=Modifier les métadonnées changeMetadata.selectText.1=Veuillez modifier les variables que vous souhaitez modifier. changeMetadata.selectText.2=Supprimer toutes les métadonnées diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 35f2627e..8f4c7afc 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -665,7 +665,13 @@ split.submit=Dividi imageToPDF.title=Immagine a PDF imageToPDF.header=Immagine a PDF imageToPDF.submit=Converti -imageToPDF.selectText.1=Allarga per riempire +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Ruota automaticamente PDF imageToPDF.selectText.3=Logica multi-file (funziona solo se ci sono più immagini) imageToPDF.selectText.4=Unisci in un unico PDF diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index 9e061f6a..d0a01cc0 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -665,7 +665,13 @@ split.submit=分割 imageToPDF.title=画像をPDFに変換 imageToPDF.header=画像をPDFに変換 imageToPDF.submit=変換 -imageToPDF.selectText.1=フィットするように引き伸ばす +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDFの自動回転 imageToPDF.selectText.3=マルチファイルの処理 (複数の画像を操作する場合に有効になります) imageToPDF.selectText.4=1つのPDFに結合 diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index f25c8fb4..5929d971 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -665,7 +665,13 @@ split.submit=분할 imageToPDF.title=이미지를 PDF로 변환 imageToPDF.header=이미지를 PDF로 변환 imageToPDF.submit=변환하기 -imageToPDF.selectText.1=맞춤 크기로 늘리기 +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDF 자동 회전 imageToPDF.selectText.3=다중 파일 로직 (여러 이미지로 작업하는 경우에만 활성화됨) imageToPDF.selectText.4=단일 PDF로 병합 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index f39c98e3..8d7340c8 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -665,7 +665,13 @@ split.submit=Splitsen imageToPDF.title=Afbeelding naar PDF imageToPDF.header=Afbeelding naar PDF imageToPDF.submit=Omzetten -imageToPDF.selectText.1=Uitrekken om te passen +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=PDF automatisch draaien imageToPDF.selectText.3=Meervoudige bestandslogica (Alleen ingeschakeld bij werken met meerdere afbeeldingen) imageToPDF.selectText.4=Voeg samen in één PDF diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index d2eaa61f..d3bf7d7c 100644 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -665,7 +665,13 @@ split.submit=Podziel imageToPDF.title=Obraz na PDF imageToPDF.header=Obraz na PDF imageToPDF.submit=Konwertuj -imageToPDF.selectText.1=Rozciągnij, aby dopasować +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Automatyczne obracanie PDF imageToPDF.selectText.3=Logika wielu plików (dostępna tylko w przypadku pracy z wieloma obrazami) imageToPDF.selectText.4=Połącz w jeden dokument PDF diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 1c904be9..2c2f0217 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -665,7 +665,13 @@ split.submit=Dividir imageToPDF.title=Imagem para PDF imageToPDF.header=Converter Imagem para PDF imageToPDF.submit=Converter -imageToPDF.selectText.1=Esticar para Ajustar +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Girar Automaticamente imageToPDF.selectText.3=Lógica de Vários Arquivos (Ativada apenas ao trabalhar com várias imagens) imageToPDF.selectText.4=Mesclar em um Único PDF diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index 6bf5f1d2..f331519a 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -665,7 +665,13 @@ split.submit=Împarte imageToPDF.title=Imagine în PDF imageToPDF.header=Imagine în PDF imageToPDF.submit=Convertă -imageToPDF.selectText.1=Redimensionare pentru a se potrivi +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Rotire automată a PDF-ului imageToPDF.selectText.3=Logica pentru mai multe fișiere (activată numai dacă se lucrează cu mai multe imagini) imageToPDF.selectText.4=Unifică într-un singur PDF diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index f71192dc..74bb5a68 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -665,7 +665,13 @@ split.submit=Разделить imageToPDF.title=Изображение в PDF imageToPDF.header=Изображение в PDF imageToPDF.submit=Конвертировать -imageToPDF.selectText.1=Растянуть, чтобы соответствовать +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Автоматический поворот PDF imageToPDF.selectText.3=Многофайловая логика (включена только при работе с несколькими изображениями) imageToPDF.selectText.4=Объединить в один PDF diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index 1e69e50b..b1b63ded 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -665,7 +665,13 @@ split.submit=Dela imageToPDF.title=Bild till PDF imageToPDF.header=Bild till PDF imageToPDF.submit=Konvertera -imageToPDF.selectText.1=Sträck för att passa +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=Rotera PDF automatiskt imageToPDF.selectText.3=Multifillogik (Endast aktiverad om man arbetar med flera bilder) imageToPDF.selectText.4=Slå samman till en enda PDF diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index c08d7863..ddf8639a 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -665,7 +665,13 @@ split.submit=拆分 imageToPDF.title=图片转PDF imageToPDF.header=图像转为PDF imageToPDF.submit=转换 -imageToPDF.selectText.1=拉伸至适合的尺寸 +########################## +### TODO: Translate ### +########################## +imageToPDF.selectLabel=Image Fit Options +imageToPDF.fillPage=Fill Page +imageToPDF.fitDocumentToImage=Fit Page to Image +imageToPDF.maintainAspectRatio=Maintain Aspect Ratios imageToPDF.selectText.2=自动旋转PDF imageToPDF.selectText.3=多文件逻辑(仅在处理多个图像时启用) imageToPDF.selectText.4=合并成一个PDF文件 diff --git a/src/main/resources/templates/convert/img-to-pdf.html b/src/main/resources/templates/convert/img-to-pdf.html index c6a2d037..ae38143c 100644 --- a/src/main/resources/templates/convert/img-to-pdf.html +++ b/src/main/resources/templates/convert/img-to-pdf.html @@ -21,10 +21,16 @@
-
- - -
+
+ + +
+ +
diff --git a/src/main/resources/templates/security/cert-sign.html b/src/main/resources/templates/security/cert-sign.html index fc2e0b8f..87957667 100644 --- a/src/main/resources/templates/security/cert-sign.html +++ b/src/main/resources/templates/security/cert-sign.html @@ -35,19 +35,19 @@
+ th:replace="~{fragments/common :: fileSelector(name='certFile', multiple=false, notRequired=true, accept='.pem,.der')}">
From 1be3046d26f68b61fbde83470aa88fde9f76ec93 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 17 Sep 2023 21:17:47 +0100 Subject: [PATCH 2/2] version bump --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7821c0ac..e803b512 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group = 'stirling.software' -version = '0.14.1' +version = '0.14.2' sourceCompatibility = '17' repositories {