From 580313151ba0a8aec833e7814d640b6664f67319 Mon Sep 17 00:00:00 2001 From: Ignacio Carrera Date: Sun, 8 Sep 2024 17:52:50 -0300 Subject: [PATCH] Page Scale: add pageSize KEEP #1798 (#1800) * add `scalePages.keepPageSize` i18n key (#1798) * add KEEP option to frontend (#1798) * extract ScalePagesController.getTargetSize() (#1798) * make ScalePageController honor `pageSize` value `KEEP` * PR feedback: make caption shorter, avoid unnecessary verbosity (#1798) * Update messages_ar_AR.properties --------- Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> --- .../controller/api/ScalePagesController.java | 64 +++++++++++++------ .../SPDF/model/api/PDFWithPageSize.java | 4 +- src/main/resources/messages_ar_AR.properties | 1 + src/main/resources/messages_bg_BG.properties | 1 + src/main/resources/messages_ca_CA.properties | 1 + src/main/resources/messages_cs_CZ.properties | 1 + src/main/resources/messages_da_DK.properties | 1 + src/main/resources/messages_de_DE.properties | 1 + src/main/resources/messages_el_GR.properties | 1 + src/main/resources/messages_en_GB.properties | 1 + src/main/resources/messages_en_US.properties | 1 + src/main/resources/messages_es_ES.properties | 1 + src/main/resources/messages_eu_ES.properties | 1 + src/main/resources/messages_fr_FR.properties | 1 + src/main/resources/messages_ga_IE.properties | 1 + src/main/resources/messages_hi_IN.properties | 1 + src/main/resources/messages_hr_HR.properties | 1 + src/main/resources/messages_hu_HU.properties | 1 + src/main/resources/messages_id_ID.properties | 1 + src/main/resources/messages_it_IT.properties | 1 + src/main/resources/messages_ja_JP.properties | 1 + src/main/resources/messages_ko_KR.properties | 1 + src/main/resources/messages_nl_NL.properties | 1 + src/main/resources/messages_no_NB.properties | 1 + src/main/resources/messages_pl_PL.properties | 1 + src/main/resources/messages_pt_BR.properties | 1 + src/main/resources/messages_pt_PT.properties | 1 + src/main/resources/messages_ro_RO.properties | 1 + src/main/resources/messages_ru_RU.properties | 1 + src/main/resources/messages_sk_SK.properties | 1 + .../resources/messages_sr_LATN_RS.properties | 1 + src/main/resources/messages_sv_SE.properties | 1 + src/main/resources/messages_th_TH.properties | 1 + src/main/resources/messages_tr_TR.properties | 1 + src/main/resources/messages_uk_UA.properties | 1 + src/main/resources/messages_vi_VN.properties | 1 + src/main/resources/messages_zh_CN.properties | 1 + src/main/resources/messages_zh_TW.properties | 1 + src/main/resources/templates/scale-pages.html | 3 +- 39 files changed, 83 insertions(+), 24 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java index 91cd012d..5eb1205d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/ScalePagesController.java @@ -47,30 +47,11 @@ public class ScalePagesController { String targetPDRectangle = request.getPageSize(); float scaleFactor = request.getScaleFactor(); - Map sizeMap = new HashMap<>(); - // Add A0 - A10 - sizeMap.put("A0", PDRectangle.A0); - sizeMap.put("A1", PDRectangle.A1); - sizeMap.put("A2", PDRectangle.A2); - sizeMap.put("A3", PDRectangle.A3); - sizeMap.put("A4", PDRectangle.A4); - sizeMap.put("A5", PDRectangle.A5); - sizeMap.put("A6", PDRectangle.A6); - - // Add other sizes - sizeMap.put("LETTER", PDRectangle.LETTER); - sizeMap.put("LEGAL", PDRectangle.LEGAL); - - if (!sizeMap.containsKey(targetPDRectangle)) { - throw new IllegalArgumentException( - "Invalid PDRectangle. It must be one of the following: A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10"); - } - - PDRectangle targetSize = sizeMap.get(targetPDRectangle); - PDDocument sourceDocument = Loader.loadPDF(file.getBytes()); PDDocument outputDocument = new PDDocument(); + PDRectangle targetSize = getTargetSize(targetPDRectangle, sourceDocument); + int totalPages = sourceDocument.getNumberOfPages(); for (int i = 0; i < totalPages; i++) { PDPage sourcePage = sourceDocument.getPage(i); @@ -116,4 +97,45 @@ public class ScalePagesController { Filenames.toSimpleFileName(file.getOriginalFilename()).replaceFirst("[.][^.]+$", "") + "_scaled.pdf"); } + + private PDRectangle getTargetSize(String targetPDRectangle, PDDocument sourceDocument) { + if (targetPDRectangle.equals("KEEP")) { + if (sourceDocument.getNumberOfPages() == 0) { + return null; + } + + // use the first page to determine the target page size + PDPage sourcePage = sourceDocument.getPage(0); + PDRectangle sourceSize = sourcePage.getMediaBox(); + + return sourceSize; + } + + Map sizeMap = getSizeMap(); + + if (sizeMap.containsKey(targetPDRectangle)) { + return sizeMap.get(targetPDRectangle); + } + + throw new IllegalArgumentException( + "Invalid PDRectangle. It must be one of the following: A0, A1, A2, A3, A4, A5, A6, LETTER, LEGAL, KEEP"); + } + + private Map getSizeMap() { + Map sizeMap = new HashMap<>(); + // Add A0 - A6 + sizeMap.put("A0", PDRectangle.A0); + sizeMap.put("A1", PDRectangle.A1); + sizeMap.put("A2", PDRectangle.A2); + sizeMap.put("A3", PDRectangle.A3); + sizeMap.put("A4", PDRectangle.A4); + sizeMap.put("A5", PDRectangle.A5); + sizeMap.put("A6", PDRectangle.A6); + + // Add other sizes + sizeMap.put("LETTER", PDRectangle.LETTER); + sizeMap.put("LEGAL", PDRectangle.LEGAL); + + return sizeMap; + } } diff --git a/src/main/java/stirling/software/SPDF/model/api/PDFWithPageSize.java b/src/main/java/stirling/software/SPDF/model/api/PDFWithPageSize.java index 139f492d..1cb0e11a 100644 --- a/src/main/java/stirling/software/SPDF/model/api/PDFWithPageSize.java +++ b/src/main/java/stirling/software/SPDF/model/api/PDFWithPageSize.java @@ -11,7 +11,7 @@ public class PDFWithPageSize extends PDFFile { @Schema( description = - "The scale of pages in the output PDF. Acceptable values are A0-A6, LETTER, LEGAL.", - allowableValues = {"A0", "A1", "A2", "A3", "A4", "A5", "A6", "LETTER", "LEGAL"}) + "The scale of pages in the output PDF. Acceptable values are A0-A6, LETTER, LEGAL, KEEP.", + allowableValues = {"A0", "A1", "A2", "A3", "A4", "A5", "A6", "LETTER", "LEGAL", "KEEP"}) private String pageSize; } diff --git a/src/main/resources/messages_ar_AR.properties b/src/main/resources/messages_ar_AR.properties index 988ee1b9..4b19d941 100644 --- a/src/main/resources/messages_ar_AR.properties +++ b/src/main/resources/messages_ar_AR.properties @@ -675,6 +675,7 @@ pageLayout.submit=إرسال scalePages.title=ضبط مقياس الصفحة scalePages.header=ضبط مقياس الصفحة scalePages.pageSize=حجم صفحة المستند. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=مستوى التكبير (الاقتصاص) للصفحة. scalePages.submit=إرسال diff --git a/src/main/resources/messages_bg_BG.properties b/src/main/resources/messages_bg_BG.properties index 5621162b..442f8789 100644 --- a/src/main/resources/messages_bg_BG.properties +++ b/src/main/resources/messages_bg_BG.properties @@ -675,6 +675,7 @@ pageLayout.submit=Подайте scalePages.title=Коригиране на мащаба на страницата scalePages.header=Коригиране на мащаба на страницата scalePages.pageSize=Размер на страница от документа. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Ниво на мащабиране (изрязване) на страница. scalePages.submit=Подайте diff --git a/src/main/resources/messages_ca_CA.properties b/src/main/resources/messages_ca_CA.properties index bdeeab37..4673d2d4 100644 --- a/src/main/resources/messages_ca_CA.properties +++ b/src/main/resources/messages_ca_CA.properties @@ -675,6 +675,7 @@ pageLayout.submit=Submit scalePages.title=Adjust page-scale scalePages.header=Adjust page-scale scalePages.pageSize=Size of a page of the document. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Zoom level (crop) of a page. scalePages.submit=Submit diff --git a/src/main/resources/messages_cs_CZ.properties b/src/main/resources/messages_cs_CZ.properties index 88997776..a5396d39 100644 --- a/src/main/resources/messages_cs_CZ.properties +++ b/src/main/resources/messages_cs_CZ.properties @@ -675,6 +675,7 @@ pageLayout.submit=Odeslat scalePages.title=Upravit měřítko stránky scalePages.header=Upravit měřítko stránky scalePages.pageSize=Velikost stránky dokumentu. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Úroveň přiblížení (oříznutí) stránky. scalePages.submit=Odeslat diff --git a/src/main/resources/messages_da_DK.properties b/src/main/resources/messages_da_DK.properties index b8619b81..198c9d82 100644 --- a/src/main/resources/messages_da_DK.properties +++ b/src/main/resources/messages_da_DK.properties @@ -675,6 +675,7 @@ pageLayout.submit=Indsend scalePages.title=Justér sidestørrelse scalePages.header=Justér sidestørrelse scalePages.pageSize=Størrelse på en side i dokumentet. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Zoom-niveau (beskæring) af en side. scalePages.submit=Indsend diff --git a/src/main/resources/messages_de_DE.properties b/src/main/resources/messages_de_DE.properties index 6958c1c7..a9034445 100644 --- a/src/main/resources/messages_de_DE.properties +++ b/src/main/resources/messages_de_DE.properties @@ -675,6 +675,7 @@ pageLayout.submit=Abschicken scalePages.title=Seitengröße anpassen scalePages.header=Seitengröße anpassen scalePages.pageSize=Format der Seiten des Dokuments +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Zoomstufe (Ausschnitt) einer Seite scalePages.submit=Abschicken diff --git a/src/main/resources/messages_el_GR.properties b/src/main/resources/messages_el_GR.properties index bc4f90b3..ba1c4e57 100644 --- a/src/main/resources/messages_el_GR.properties +++ b/src/main/resources/messages_el_GR.properties @@ -675,6 +675,7 @@ pageLayout.submit=Υποβολή scalePages.title=Προσαρμογή κλίμακας σελίδας scalePages.header=Προσαρμογή κλίμακας σελίδας scalePages.pageSize=Μέγεθος μιας σελίδας του εγγράφου. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Επίπεδο ζουμ (περικοπή) σελίδας. scalePages.submit=Υποβολή diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index a06d4f61..82e24747 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -675,6 +675,7 @@ pageLayout.submit=Submit scalePages.title=Adjust page-scale scalePages.header=Adjust page-scale scalePages.pageSize=Size of a page of the document. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Zoom level (crop) of a page. scalePages.submit=Submit diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index 0bb444b5..5cec323e 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -675,6 +675,7 @@ pageLayout.submit=Submit scalePages.title=Adjust page-scale scalePages.header=Adjust page-scale scalePages.pageSize=Size of a page of the document. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Zoom level (crop) of a page. scalePages.submit=Submit diff --git a/src/main/resources/messages_es_ES.properties b/src/main/resources/messages_es_ES.properties index 3ece07d7..cd28db08 100644 --- a/src/main/resources/messages_es_ES.properties +++ b/src/main/resources/messages_es_ES.properties @@ -675,6 +675,7 @@ pageLayout.submit=Entregar scalePages.title=Ajustar escala de la página scalePages.header=Adjustar escala de la página scalePages.pageSize=Tamaño de la página del documento +scalePages.keepPageSize=Tamaño Original scalePages.scaleFactor=Nivel de zoom (recorte) de la página scalePages.submit=Entregar diff --git a/src/main/resources/messages_eu_ES.properties b/src/main/resources/messages_eu_ES.properties index 7604ec73..5a297eac 100644 --- a/src/main/resources/messages_eu_ES.properties +++ b/src/main/resources/messages_eu_ES.properties @@ -675,6 +675,7 @@ pageLayout.submit=Entregatu scalePages.title=Doitu orrialdearen eskala scalePages.header=Doitu orrialdearen eskala scalePages.pageSize=Dokumentuaren orrialdearen tamaina +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Orriaren zoom maila (moztea) scalePages.submit=Entregatu diff --git a/src/main/resources/messages_fr_FR.properties b/src/main/resources/messages_fr_FR.properties index 4624897c..f51e31d2 100644 --- a/src/main/resources/messages_fr_FR.properties +++ b/src/main/resources/messages_fr_FR.properties @@ -675,6 +675,7 @@ pageLayout.submit=Fusionner scalePages.title=Ajuster la taille ou l’échelle scalePages.header=Ajuster la taille ou l’échelle scalePages.pageSize=Taille d’une page du document +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Niveau de zoom (recadrage) d’une page scalePages.submit=Ajuster diff --git a/src/main/resources/messages_ga_IE.properties b/src/main/resources/messages_ga_IE.properties index 9af1c527..65b90cfa 100644 --- a/src/main/resources/messages_ga_IE.properties +++ b/src/main/resources/messages_ga_IE.properties @@ -675,6 +675,7 @@ pageLayout.submit=Cuir isteach scalePages.title=Coigeartaigh scála an leathanaigh scalePages.header=Coigeartaigh scála an leathanaigh scalePages.pageSize=Méid leathanach den doiciméad. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Leibhéal súmáil (barr) de leathanach. scalePages.submit=Cuir isteach diff --git a/src/main/resources/messages_hi_IN.properties b/src/main/resources/messages_hi_IN.properties index 76898c8a..24e68fbd 100644 --- a/src/main/resources/messages_hi_IN.properties +++ b/src/main/resources/messages_hi_IN.properties @@ -675,6 +675,7 @@ pageLayout.submit=प्रस्तुत क scalePages.title=पृष्ठ-स्केल समायोजित करें scalePages.header=पृष्ठ-स्केल समायोजित करें scalePages.pageSize=दस्तावेज़ के पृष्ठ का आकार। +scalePages.keepPageSize=Original Size scalePages.scaleFactor=पृष्ठ का ज़ूम स्तर (क्रॉप)। scalePages.submit=प्रस्तुत करें diff --git a/src/main/resources/messages_hr_HR.properties b/src/main/resources/messages_hr_HR.properties index 74db869d..d669f1f7 100644 --- a/src/main/resources/messages_hr_HR.properties +++ b/src/main/resources/messages_hr_HR.properties @@ -675,6 +675,7 @@ pageLayout.submit=Potvrdi scalePages.title=Podesite veličinu stranice scalePages.header=Podesite veličinu stranice scalePages.pageSize=Veličina stranice dokumenta. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Razina zumiranja (obrezivanje) stranice. scalePages.submit=Potvrdi diff --git a/src/main/resources/messages_hu_HU.properties b/src/main/resources/messages_hu_HU.properties index 8232b4d7..417c3909 100644 --- a/src/main/resources/messages_hu_HU.properties +++ b/src/main/resources/messages_hu_HU.properties @@ -675,6 +675,7 @@ pageLayout.submit=Elküldés scalePages.title=Oldalméret beállítása scalePages.header=Oldalméret beállítása scalePages.pageSize=A dokumentum egy oldalának mérete. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Az oldal nagyításának szintje (vágás). scalePages.submit=Küldés diff --git a/src/main/resources/messages_id_ID.properties b/src/main/resources/messages_id_ID.properties index 12461e3d..109b57c0 100644 --- a/src/main/resources/messages_id_ID.properties +++ b/src/main/resources/messages_id_ID.properties @@ -675,6 +675,7 @@ pageLayout.submit=Kirim scalePages.title=Sesuaikan skala halaman scalePages.header=Sesuaikan skala halaman scalePages.pageSize=Ukuran halaman dokumen. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Tingkat zoom (potong) halaman. scalePages.submit=Kirim diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 887e56a1..32ae8f33 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -675,6 +675,7 @@ pageLayout.submit=Invia scalePages.title=Regola la scala della pagina scalePages.header=Regola la scala della pagina scalePages.pageSize=Dimensione di una pagina del documento. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Livello di zoom (ritaglio) di una pagina. scalePages.submit=Invia diff --git a/src/main/resources/messages_ja_JP.properties b/src/main/resources/messages_ja_JP.properties index 126e2e92..b7e64251 100644 --- a/src/main/resources/messages_ja_JP.properties +++ b/src/main/resources/messages_ja_JP.properties @@ -675,6 +675,7 @@ pageLayout.submit=送信 scalePages.title=ページの縮尺の調整 scalePages.header=ページの縮尺の調整 scalePages.pageSize=1ページのサイズ +scalePages.keepPageSize=Original Size scalePages.scaleFactor=1ページの拡大レベル (トリミング)。 scalePages.submit=送信 diff --git a/src/main/resources/messages_ko_KR.properties b/src/main/resources/messages_ko_KR.properties index e4454e5d..3110922a 100644 --- a/src/main/resources/messages_ko_KR.properties +++ b/src/main/resources/messages_ko_KR.properties @@ -675,6 +675,7 @@ pageLayout.submit=확인 scalePages.title=페이지 배율 조절 scalePages.header=페이지 배율 조절 scalePages.pageSize=페이지의 크기를 조절합니다. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=페이지 배율 조절 (잘라내기) scalePages.submit=제출 diff --git a/src/main/resources/messages_nl_NL.properties b/src/main/resources/messages_nl_NL.properties index c9290a8f..b0ed1ca8 100644 --- a/src/main/resources/messages_nl_NL.properties +++ b/src/main/resources/messages_nl_NL.properties @@ -675,6 +675,7 @@ pageLayout.submit=Indienen scalePages.title=Pagina-schaal aanpassen scalePages.header=Pagina-schaal aanpassen scalePages.pageSize=Grootte van een pagina van het document. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Zoomniveau (uitsnede) van een pagina. scalePages.submit=Indienen diff --git a/src/main/resources/messages_no_NB.properties b/src/main/resources/messages_no_NB.properties index 3658be87..a9794fbb 100644 --- a/src/main/resources/messages_no_NB.properties +++ b/src/main/resources/messages_no_NB.properties @@ -675,6 +675,7 @@ pageLayout.submit=Send inn scalePages.title=Juster side-skala scalePages.header=Juster side-skala scalePages.pageSize=Størrelse på et ark i dokumentet. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Zoom-nivå (beskjær) for en side. scalePages.submit=Send inn diff --git a/src/main/resources/messages_pl_PL.properties b/src/main/resources/messages_pl_PL.properties index d285cb71..7c4556ab 100755 --- a/src/main/resources/messages_pl_PL.properties +++ b/src/main/resources/messages_pl_PL.properties @@ -675,6 +675,7 @@ pageLayout.submit=Wykonaj scalePages.title=Dopasuj rozmiar stron scalePages.header=Dopasuj rozmiar stron scalePages.pageSize=Rozmiar stron dokumentu: +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Poziom powiększenia (przycięcia) stron: scalePages.submit=Wykonaj diff --git a/src/main/resources/messages_pt_BR.properties b/src/main/resources/messages_pt_BR.properties index 99e5c923..4f3804c0 100644 --- a/src/main/resources/messages_pt_BR.properties +++ b/src/main/resources/messages_pt_BR.properties @@ -675,6 +675,7 @@ pageLayout.submit=Enviar scalePages.title=Ajustar Tamanho/Escala da Página scalePages.header=Ajustar Tamanho/Escala da Página scalePages.pageSize=Tamanho de uma página do documento. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Fator de zoom (corte) de uma página. scalePages.submit=Enviar diff --git a/src/main/resources/messages_pt_PT.properties b/src/main/resources/messages_pt_PT.properties index 83b5f834..9d13fd99 100644 --- a/src/main/resources/messages_pt_PT.properties +++ b/src/main/resources/messages_pt_PT.properties @@ -675,6 +675,7 @@ pageLayout.submit=Enviar scalePages.title=Ajustar Tamanho/Escala da Página scalePages.header=Ajustar Tamanho/Escala da Página scalePages.pageSize=Tamanho de uma página do documento. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Fator de zoom (corte) de uma página. scalePages.submit=Enviar diff --git a/src/main/resources/messages_ro_RO.properties b/src/main/resources/messages_ro_RO.properties index c7c4945e..e4d96c25 100644 --- a/src/main/resources/messages_ro_RO.properties +++ b/src/main/resources/messages_ro_RO.properties @@ -675,6 +675,7 @@ pageLayout.submit=Trimite scalePages.title=Ajustează scala paginii scalePages.header=Ajustează scala paginii scalePages.pageSize=Dimensiunea unei pagini a documentului. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Nivel de zoom (decupare) al unei pagini. scalePages.submit=Trimite diff --git a/src/main/resources/messages_ru_RU.properties b/src/main/resources/messages_ru_RU.properties index dfa8bf12..4fd23c09 100644 --- a/src/main/resources/messages_ru_RU.properties +++ b/src/main/resources/messages_ru_RU.properties @@ -675,6 +675,7 @@ pageLayout.submit=Отправить scalePages.title=Отрегулировать масштаб страницы scalePages.header=Отрегулировать масштаб страницы scalePages.pageSize=Размер страницы документа. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Уровень масштабирования (обрезки) страницы. scalePages.submit=Отправить diff --git a/src/main/resources/messages_sk_SK.properties b/src/main/resources/messages_sk_SK.properties index ff243057..3452d732 100644 --- a/src/main/resources/messages_sk_SK.properties +++ b/src/main/resources/messages_sk_SK.properties @@ -675,6 +675,7 @@ pageLayout.submit=Odoslať scalePages.title=Upraviť mierku stránky scalePages.header=Upraviť mierku stránky scalePages.pageSize=Veľkosť stránky dokumentu. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Úroveň priblíženia (orezania) stránky. scalePages.submit=Odoslať diff --git a/src/main/resources/messages_sr_LATN_RS.properties b/src/main/resources/messages_sr_LATN_RS.properties index c541aea0..53226f25 100644 --- a/src/main/resources/messages_sr_LATN_RS.properties +++ b/src/main/resources/messages_sr_LATN_RS.properties @@ -675,6 +675,7 @@ pageLayout.submit=Potvrdi scalePages.title=Podesi razmeru stranica scalePages.header=Podesi razmeru stranica scalePages.pageSize=Veličina stranice dokumenta. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Nivo zumiranja (rezanje) stranice. scalePages.submit=Potvrdi diff --git a/src/main/resources/messages_sv_SE.properties b/src/main/resources/messages_sv_SE.properties index c071c7bf..3d159d3a 100644 --- a/src/main/resources/messages_sv_SE.properties +++ b/src/main/resources/messages_sv_SE.properties @@ -675,6 +675,7 @@ pageLayout.submit=Skicka scalePages.title=Justera sidskala scalePages.header=Justera sidskala scalePages.pageSize=Storlek på en sida i dokumentet. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Zoomnivå (beskärning) för en sida. scalePages.submit=Skicka diff --git a/src/main/resources/messages_th_TH.properties b/src/main/resources/messages_th_TH.properties index 2b59eed8..ae82a70f 100644 --- a/src/main/resources/messages_th_TH.properties +++ b/src/main/resources/messages_th_TH.properties @@ -675,6 +675,7 @@ pageLayout.submit=ส่ง scalePages.title=ปรับสเกลหน้า scalePages.header=ปรับสเกลหน้า scalePages.pageSize=ขนาดหน้าของเอกสาร +scalePages.keepPageSize=Original Size scalePages.scaleFactor=ระดับการซูม (ครอบตัด) ของหน้า scalePages.submit=ส่ง diff --git a/src/main/resources/messages_tr_TR.properties b/src/main/resources/messages_tr_TR.properties index 8cfaac24..c5d72ccf 100644 --- a/src/main/resources/messages_tr_TR.properties +++ b/src/main/resources/messages_tr_TR.properties @@ -675,6 +675,7 @@ pageLayout.submit=Gönder scalePages.title=Sayfa Ölçeğini Ayarla scalePages.header=Sayfa Ölçeğini Ayarla scalePages.pageSize=Belgenin bir sayfa boyutu. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Bir sayfanın yakınlaştırma seviyesi (kırpma). scalePages.submit=Gönder diff --git a/src/main/resources/messages_uk_UA.properties b/src/main/resources/messages_uk_UA.properties index e9b0af8e..41ca0038 100644 --- a/src/main/resources/messages_uk_UA.properties +++ b/src/main/resources/messages_uk_UA.properties @@ -675,6 +675,7 @@ pageLayout.submit=Відправити scalePages.title=Відрегулювати масштаб сторінки scalePages.header=Відрегулювати масштаб сторінки scalePages.pageSize=Розмір сторінки документа. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Рівень масштабування (обрізки) сторінки. scalePages.submit=Відправити diff --git a/src/main/resources/messages_vi_VN.properties b/src/main/resources/messages_vi_VN.properties index dda3697b..28ef3fa1 100644 --- a/src/main/resources/messages_vi_VN.properties +++ b/src/main/resources/messages_vi_VN.properties @@ -675,6 +675,7 @@ pageLayout.submit=Gửi scalePages.title=Điều chỉnh tỷ lệ trang scalePages.header=Điều chỉnh tỷ lệ trang scalePages.pageSize=Kích thước của một trang trong tài liệu. +scalePages.keepPageSize=Original Size scalePages.scaleFactor=Mức độ phóng to (cắt cúp) của một trang. scalePages.submit=Gửi diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index a714fae1..979b8b44 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -675,6 +675,7 @@ pageLayout.submit=提交 scalePages.title=调整页面缩放比例 scalePages.header=调整页面缩放比例 scalePages.pageSize=文档页面的尺寸。 +scalePages.keepPageSize=Original Size scalePages.scaleFactor=页面的缩放级别(裁剪)。 scalePages.submit=提交 diff --git a/src/main/resources/messages_zh_TW.properties b/src/main/resources/messages_zh_TW.properties index 19cb7214..096a5625 100644 --- a/src/main/resources/messages_zh_TW.properties +++ b/src/main/resources/messages_zh_TW.properties @@ -675,6 +675,7 @@ pageLayout.submit=送出 scalePages.title=調整頁面大小/比例 scalePages.header=調整頁面大小/比例 scalePages.pageSize=文件的頁面大小。 +scalePages.keepPageSize=Original Size scalePages.scaleFactor=頁面的縮放級別(裁剪)。 scalePages.submit=送出 diff --git a/src/main/resources/templates/scale-pages.html b/src/main/resources/templates/scale-pages.html index ad650828..e6f19032 100644 --- a/src/main/resources/templates/scale-pages.html +++ b/src/main/resources/templates/scale-pages.html @@ -21,11 +21,12 @@