From 6662115d10a4b855bd8282a9bdb9842b3467fa8c Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 5 Feb 2023 12:54:48 +0000 Subject: [PATCH] Lang setup (#35) --- .gitignore | 3 +- HowToAddNewLanguage.md | 29 +++ .../stirling/software/SPDF/config/Beans.java | 35 +++ src/main/resources/messages.properties | 0 src/main/resources/messages_en_GB.properties | 209 ++++++++++++++++++ src/main/resources/messages_en_US.properties | 209 ++++++++++++++++++ src/main/resources/templates/add-image.html | 10 +- .../resources/templates/compress-pdf.html | 14 +- .../templates/convert/img-to-pdf.html | 8 +- .../templates/convert/pdf-to-img.html | 10 +- .../resources/templates/fragments/card.html | 2 +- .../resources/templates/fragments/navbar.html | 97 +++++--- src/main/resources/templates/home.html | 29 ++- src/main/resources/templates/merge-pdfs.html | 10 +- .../resources/templates/pdf-organizer.html | 16 +- .../resources/templates/remove-pages.html | 12 +- src/main/resources/templates/rotate-pdf.html | 11 +- .../templates/security/add-password.html | 41 ++-- .../templates/security/add-watermark.html | 20 +- .../security/change-permissions.html | 39 ++-- .../templates/security/remove-password.html | 14 +- src/main/resources/templates/split-pdfs.html | 28 ++- 22 files changed, 674 insertions(+), 172 deletions(-) create mode 100644 HowToAddNewLanguage.md create mode 100644 src/main/java/stirling/software/SPDF/config/Beans.java create mode 100644 src/main/resources/messages.properties create mode 100644 src/main/resources/messages_en_GB.properties create mode 100644 src/main/resources/messages_en_US.properties diff --git a/.gitignore b/.gitignore index c8a31d91..474d7cc6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,8 @@ local.properties .settings/ .loadpath .recommenders - +.classpath +.project # Gradle .gradle diff --git a/HowToAddNewLanguage.md b/HowToAddNewLanguage.md new file mode 100644 index 00000000..8f7a6998 --- /dev/null +++ b/HowToAddNewLanguage.md @@ -0,0 +1,29 @@ +

tirling-PDF

+ +# How to add new languages to Stirling-PDF + +Fork Stirling-PDF and make a new branch out of Main + +Then add reference to the language in the navbar by adding a new language entry to the dropdown + +https://github.com/Frooodle/Stirling-PDF/blob/main/src/main/resources/templates/fragments/navbar.html#L80 + +For example to add Polish you would add +``` +Polish +``` +The data-language-code is the code used to reference the file in the next step. + +Start by copying the existing english property file + +https://github.com/Frooodle/Stirling-PDF/tree/langSetup/src/main/resources/messages_en_GB.properties + +Copy and rename it to messages_{your data-language-code here}.properties, in the polish example you would set the name to messages_pl_PL.properties + + +Then simply translate all property entries within that file and make a PR into main for others to use! + +If you do not have a java IDE i am happy to verify the changes worked once you raise PR (but wont be able to verify the translations themselves) + + + diff --git a/src/main/java/stirling/software/SPDF/config/Beans.java b/src/main/java/stirling/software/SPDF/config/Beans.java new file mode 100644 index 00000000..72a41b6a --- /dev/null +++ b/src/main/java/stirling/software/SPDF/config/Beans.java @@ -0,0 +1,35 @@ +package stirling.software.SPDF.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.LocaleResolver; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; +import org.springframework.web.servlet.i18n.SessionLocaleResolver; + +import java.util.Locale; + +@Configuration +public class Beans implements WebMvcConfigurer { + + @Bean + public LocaleResolver localeResolver() { + SessionLocaleResolver slr = new SessionLocaleResolver(); + slr.setDefaultLocale(Locale.US); + return slr; + } + + @Bean + public LocaleChangeInterceptor localeChangeInterceptor() { + LocaleChangeInterceptor lci = new LocaleChangeInterceptor(); + lci.setParamName("lang"); + return lci; + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(localeChangeInterceptor()); + } + +} diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties new file mode 100644 index 00000000..e69de29b diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties new file mode 100644 index 00000000..a84c3148 --- /dev/null +++ b/src/main/resources/messages_en_GB.properties @@ -0,0 +1,209 @@ +########### +# Generic # +########### +pdfPrompt=Choose PDF +multiPdfPrompt=Choose PDFs (2+) +multiPdfDropPrompt=Select (or drag & drop) all PDFs you require +imgPrompt=Choose Image +genericSubmit=Submit +processTimeWarning=Warning: This process can take up to a minute depending on file-size +pageOrderPrompt=Page Order (Enter a comma-separated list of page numbers) : +goToPage=go +############# +# HOME-PAGE # +############# +home.desc=Your locally hosted one-stop-shop for all your PDF needs. + +navbar.convert=Convert +navbar.security=Security +navbar.other=Other +navbar.darkmode=Dark Mode + +home.merge.title=Merge PDFs +home.merge.desc=Easily merge multiple PDFs into one. + +home.split.title=Split PDFs +home.split.desc=Split PDFs into multiple documents + +home.rotate.title=Rotate PDFs +home.rotate.desc=Easily rotate your PDFs. + +home.imageToPdf.title=Image to PDF +home.imageToPdf.desc=Convert a images (PNG, JPEG, GIF) to PDF. + +home.pdfToImage.title=PDF to Image +home.pdfToImage.desc=Convert a PDF to a image. (PNG, JPEG, GIF) + +home.pdfOrganiser.title=PDF Organiser +home.pdfOrganiser.desc=Remove/Rearrange pages in any order + +home.addImage.title=Add image onto PDF +home.addImage.desc=Adds a image onto a set location on the PDF (Work in progress) + +home.watermark.title=Add Watermark +home.watermark.desc=Add a custom watermark to your PDF document. + +home.permissions.title=Change Permissions +home.permissions.desc=Change the permissions of your PDF document + +home.removePages.title=Remove Pages +home.removePages.desc=Delete unwanted pages from your PDF document. + +home.addPassword.title=Add Password +home.addPassword.desc=Encrypt your PDF document with a password. + +home.removePassword.title=Remove Password +home.removePassword.desc=Remove password protection from your PDF document. + +home.compressPdfs.title=Compress PDFs +home.compressPdfs.desc=Compress PDFs to reduce their file size. + + + +#Add image +addImage.title=Add Image +addImage.header=Add image to PDF (Work in progress) +addImage.submit=Add image + +#compress +compress.title=Compress +compress.header=Compress PDF +compress.compressLevel=Value between 1 and 100 (1 being most reduced) +compress.submit=Compress + + +#merge +merge.title=Merge +merge.header=Merge multiple PDFs (2+) +merge.submit=Merge + +#pdfOrganiser +pdfOrganiser.title=Page Organiser +pdfOrganiser.header=PDF Page Organiser +pdfOrganiser.submit=Rearrange Pages + + +#pageRemover +pageRemover.title=Page Remover +pageRemover.header=PDF Page remover +pageRemover.pagesToDelete=Pages to delete (Enter a comma-separated list of page numbers) : +pageRemover.submit=Delete Pages + +#rotate +rotate.title=Rotate PDF +rotate.header=Rotate PDF +rotate.selectAngle=Select rotation angle (in multiples of 90 degrees): +rotate.submit=Rotate + + + + +#merge +split.title=Split PDF +split.header=Split PDF +split.desc.1=The numbers you select are the page number you wish to do a split on +split.desc.2=As such selecting 1,3,7-8 would split a 10 page document into 6 separate PDFS with: +split.desc.3=Document #1: Page 1 +split.desc.4=Document #2: Page 2 and 3 +split.desc.5=Document #3: Page 4, 5 and 6 +split.desc.6=Document #4: Page 7 +split.desc.7=Document #5: Page 8 +split.desc.8=Document #6: Page 9 and 10 +split.splitPages=Enter pages to split on: +split.submit=Split + + +#merge +imageToPDF.title=Image to PDF +imageToPDF.header=Image to PDF +imageToPDF.submit=Convert + +#pdfToImage +pdfToImage.title=PDF to Image +pdfToImage.header=PDF to Image +pdfToImage.selectText=Image Format +pdfToImage.submit=Convert + +#addPassword +addPassword.title=Add Password +addPassword.header=Add password (Encrypt) +addPassword.selectText.1=Select PDF to encrypt +addPassword.selectText.2=Password +addPassword.selectText.3=Encryption Key Length +addPassword.selectText.4=Higher values are stronger, but lower values have better compatibility. +addPassword.selectText.5=Permissions to set +addPassword.selectText.6=Prevent assembly of document +addPassword.selectText.7=Prevent content extraction +addPassword.selectText.8=Prevent extraction for accessibility +addPassword.selectText.9=Prevent filling in form +addPassword.selectText.10=Prevent modification +addPassword.selectText.11=Prevent annotation modification +addPassword.selectText.12=Prevent printing +addPassword.selectText.13=Prevent printing different formats +addPassword.submit=Encrypt + +#watermark +watermark.title=Add Watermark +watermark.header=Add Watermark +watermark.selectText.1=Select PDF to add watermark to: +watermark.selectText.2=Watermark Text: +watermark.selectText.3=Font Size: +watermark.selectText.4=Rotation (0-360): +watermark.selectText.5=widthSpacer (Space between each watermark horizontally): +watermark.selectText.6=heightSpacer (Space between each watermark vertically): +watermark.submit=Add Watermark + + +#Change permissions +permissions.title=Change Permissions +permissions.header=Change Permissions +permissions.warning=Warning to have these permissions be unchangeable it is recommended to set them with a password via the add-password page +permissions.selectText.1=Select PDF to change permissions +permissions.selectText.2=Permissions to set +permissions.selectText.3=Prevent assembly of document +permissions.selectText.4=Prevent content extraction +permissions.selectText.5=Prevent extraction for accessibility +permissions.selectText.6=Prevent filling in form +permissions.selectText.7=Prevent modification +permissions.selectText.8=Prevent annotation modification +permissions.selectText.9=Prevent printing +permissions.selectText.10=Prevent printing different formats +permissions.submit=Change + +#remove password +removePassword.title=Remove password +removePassword.header=Remove password (Decrypt) +removePassword.selectText.1=Select PDF to Decrypt +removePassword.selectText.2=Password +removePassword.submit=Remove + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties new file mode 100644 index 00000000..802fbe34 --- /dev/null +++ b/src/main/resources/messages_en_US.properties @@ -0,0 +1,209 @@ +########### +# Generic # +########### +pdfPrompt=Choose PDF +multiPdfPrompt=Choose PDFs (2+) +multiPdfDropPrompt=Select (or drag & drop) all PDFs you require +imgPrompt=Choose Image +genericSubmit=Submit +processTimeWarning=Warning: This process can take up to a minute depending on file-size +pageOrderPrompt=Page Order (Enter a comma-separated list of page numbers) : +goToPage=go +############# +# HOME-PAGE # +############# +home.desc=Your locally hosted one-stop-shop for all your PDF needs. + +navbar.convert=Convert +navbar.security=Security +navbar.other=Other +navbar.darkmode=Dark Mode + +home.merge.title=Merge PDFs +home.merge.desc=Easily merge multiple PDFs into one. + +home.split.title=Split PDFs +home.split.desc=Split PDFs into multiple documents + +home.rotate.title=Rotate PDFs +home.rotate.desc=Easily rotate your PDFs. + +home.imageToPdf.title=Image to PDF +home.imageToPdf.desc=Convert a images (PNG, JPEG, GIF) to PDF. + +home.pdfToImage.title=PDF to Image +home.pdfToImage.desc=Convert a PDF to a image. (PNG, JPEG, GIF) + +home.pdfOrganiser.title=PDF Organizer +home.pdfOrganiser.desc=Remove/Rearrange pages in any order + +home.addImage.title=Add image onto PDF +home.addImage.desc=Adds a image onto a set location on the PDF (Work in progress) + +home.watermark.title=Add Watermark +home.watermark.desc=Add a custom watermark to your PDF document. + +home.permissions.title=Change Permissions +home.permissions.desc=Change the permissions of your PDF document + +home.removePages.title=Remove Pages +home.removePages.desc=Delete unwanted pages from your PDF document. + +home.addPassword.title=Add Password +home.addPassword.desc=Encrypt your PDF document with a password. + +home.removePassword.title=Remove Password +home.removePassword.desc=Remove password protection from your PDF document. + +home.compressPdfs.title=Compress PDFs +home.compressPdfs.desc=Compress PDFs to reduce their file size. + + + +#Add image +addImage.title=Add Image +addImage.header=Add image to PDF (Work in progress) +addImage.submit=Add image + +#compress +compress.title=Compress +compress.header=Compress PDF +compress.compressLevel=Value between 1 and 100 (1 being most reduced) +compress.submit=Compress + + +#merge +merge.title=Merge +merge.header=Merge multiple PDFs (2+) +merge.submit=Merge + +#pdfOrganiser +pdfOrganiser.title=Page Organizer +pdfOrganiser.header=PDF Page Organizer +pdfOrganiser.submit=Rearrange Pages + + +#pageRemover +pageRemover.title=Page Remover +pageRemover.header=PDF Page remover +pageRemover.pagesToDelete=Pages to delete (Enter a comma-separated list of page numbers) : +pageRemover.submit=Delete Pages + +#rotate +rotate.title=Rotate PDF +rotate.header=Rotate PDF +rotate.selectAngle=Select rotation angle (in multiples of 90 degrees): +rotate.submit=Rotate + + + + +#merge +split.title=Split PDF +split.header=Split PDF +split.desc.1=The numbers you select are the page number you wish to do a split on +split.desc.2=As such selecting 1,3,7-8 would split a 10 page document into 6 separate PDFS with: +split.desc.3=Document #1: Page 1 +split.desc.4=Document #2: Page 2 and 3 +split.desc.5=Document #3: Page 4, 5 and 6 +split.desc.6=Document #4: Page 7 +split.desc.7=Document #5: Page 8 +split.desc.8=Document #6: Page 9 and 10 +split.splitPages=Enter pages to split on: +split.submit=Split + + +#merge +imageToPDF.title=Image to PDF +imageToPDF.header=Image to PDF +imageToPDF.submit=Convert + +#pdfToImage +pdfToImage.title=PDF to Image +pdfToImage.header=PDF to Image +pdfToImage.selectText=Image Format +pdfToImage.submit=Convert + +#addPassword +addPassword.title=Add Password +addPassword.header=Add password (Encrypt) +addPassword.selectText.1=Select PDF to encrypt +addPassword.selectText.2=Password +addPassword.selectText.3=Encryption Key Length +addPassword.selectText.4=Higher values are stronger, but lower values have better compatibility. +addPassword.selectText.5=Permissions to set +addPassword.selectText.6=Prevent assembly of document +addPassword.selectText.7=Prevent content extraction +addPassword.selectText.8=Prevent extraction for accessibility +addPassword.selectText.9=Prevent filling in form +addPassword.selectText.10=Prevent modification +addPassword.selectText.11=Prevent annotation modification +addPassword.selectText.12=Prevent printing +addPassword.selectText.13=Prevent printing different formats +addPassword.submit=Encrypt + +#watermark +watermark.title=Add Watermark +watermark.header=Add Watermark +watermark.selectText.1=Select PDF to add watermark to: +watermark.selectText.2=Watermark Text: +watermark.selectText.3=Font Size: +watermark.selectText.4=Rotation (0-360): +watermark.selectText.5=widthSpacer (Space between each watermark horizontally): +watermark.selectText.6=heightSpacer (Space between each watermark vertically): +watermark.submit=Add Watermark + + +#Change permissions +permissions.title=Change Permissions +permissions.header=Change Permissions +permissions.warning=Warning to have these permissions be unchangeable it is recommended to set them with a password via the add-password page +permissions.selectText.1=Select PDF to change permissions +permissions.selectText.2=Permissions to set +permissions.selectText.3=Prevent assembly of document +permissions.selectText.4=Prevent content extraction +permissions.selectText.5=Prevent extraction for accessibility +permissions.selectText.6=Prevent filling in form +permissions.selectText.7=Prevent modification +permissions.selectText.8=Prevent annotation modification +permissions.selectText.9=Prevent printing +permissions.selectText.10=Prevent printing different formats +permissions.submit=Change + +#remove password +removePassword.title=Remove password +removePassword.header=Remove password (Decrypt) +removePassword.selectText.1=Select PDF to Decrypt +removePassword.selectText.2=Password +removePassword.submit=Remove + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/add-image.html b/src/main/resources/templates/add-image.html index 111775dd..4d80fb81 100644 --- a/src/main/resources/templates/add-image.html +++ b/src/main/resources/templates/add-image.html @@ -2,7 +2,7 @@ - + @@ -14,7 +14,7 @@
-

Add image to PDF (Work in progress)

+

@@ -24,12 +24,12 @@
+ class="custom-file-label" for="fileInput" th:text="#{pdfPrompt}">
+ class="custom-file-label" for="fileInput2" th:text="#{imgPrompt}">
Y
- + diff --git a/src/main/resources/templates/compress-pdf.html b/src/main/resources/templates/compress-pdf.html index 7631ba4e..5ae35ab6 100644 --- a/src/main/resources/templates/compress-pdf.html +++ b/src/main/resources/templates/compress-pdf.html @@ -2,7 +2,7 @@ - +
@@ -13,25 +13,23 @@
-

Compress PDF

+

-

Warning: This process can take up to a minute depending on - file-size

+

+ class="custom-file-label" for="fileInput" th:text="#{pdfPrompt}">
-
- +
diff --git a/src/main/resources/templates/convert/img-to-pdf.html b/src/main/resources/templates/convert/img-to-pdf.html index 48d8427b..cdb5bc04 100644 --- a/src/main/resources/templates/convert/img-to-pdf.html +++ b/src/main/resources/templates/convert/img-to-pdf.html @@ -1,7 +1,7 @@ - +
@@ -12,18 +12,18 @@
-

Image to PDF

+

+ class="custom-file-label" for="fileInput" th:text="#{imgPrompt}">


- +
diff --git a/src/main/resources/templates/convert/pdf-to-img.html b/src/main/resources/templates/convert/pdf-to-img.html index c37e0c81..291507b3 100644 --- a/src/main/resources/templates/convert/pdf-to-img.html +++ b/src/main/resources/templates/convert/pdf-to-img.html @@ -1,7 +1,7 @@ - +
@@ -13,23 +13,23 @@
-

PDF to Image

+

+ class="custom-file-label" for="fileInput" th:text="#{pdfPrompt}">
-
- +
diff --git a/src/main/resources/templates/fragments/card.html b/src/main/resources/templates/fragments/card.html index a8ba116d..6fc41cfd 100644 --- a/src/main/resources/templates/fragments/card.html +++ b/src/main/resources/templates/fragments/card.html @@ -1,5 +1,5 @@

- Go +
\ No newline at end of file diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index 3fb1202a..d1c8123c 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -12,56 +12,46 @@ + th:classappend="${currentPage}=='merge-pdfs' ? 'active' : ''" th:text="#{home.merge.title}"> + th:classappend="${currentPage}=='split-pdfs' ? 'active' : ''" th:text="#{home.split.title}"> + th:classappend="${currentPage}=='pdf-organizer' ? 'active' : ''" th:text="#{home.pdfOrganiser.title}"> + th:classappend="${currentPage}=='rotate-pdf' ? 'active' : ''" th:text="#{home.rotate.title}"> @@ -77,10 +67,63 @@ - Dark Mode + + + + + + +
diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html index d974f266..c8904f6b 100644 --- a/src/main/resources/templates/home.html +++ b/src/main/resources/templates/home.html @@ -33,30 +33,29 @@

Stirling PDF

-

Your locally hosted one-stop-shop for all your - PDF needs. (Made 100% in ChatGPT in 1 day as a experiment)

+

-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
diff --git a/src/main/resources/templates/merge-pdfs.html b/src/main/resources/templates/merge-pdfs.html index 9337393a..2db124a4 100644 --- a/src/main/resources/templates/merge-pdfs.html +++ b/src/main/resources/templates/merge-pdfs.html @@ -1,7 +1,7 @@ - +
@@ -12,22 +12,22 @@
-

Merge multiple PDFs (2+)

+

- +
+ class="custom-file-label" th:text="#{pdfPrompt}">s
    - +
    diff --git a/src/main/resources/templates/pdf-organizer.html b/src/main/resources/templates/pdf-organizer.html index 10d7e1a8..01c5615c 100644 --- a/src/main/resources/templates/pdf-organizer.html +++ b/src/main/resources/templates/pdf-organizer.html @@ -1,7 +1,7 @@ - +
    @@ -12,25 +12,21 @@
    -

    PDF Page Organizer

    - - - +

    +
    + class="custom-file-label" for="fileInput" th:text="#{pdfPrompt}">
    -
    - +
    diff --git a/src/main/resources/templates/remove-pages.html b/src/main/resources/templates/remove-pages.html index 06e6c25e..ac6e573f 100644 --- a/src/main/resources/templates/remove-pages.html +++ b/src/main/resources/templates/remove-pages.html @@ -1,7 +1,7 @@ - +
    @@ -12,23 +12,21 @@
    -

    PDF Page remover

    +

    + class="custom-file-label" for="fileInput" th:text="#{pdfPrompt}">
    -
    - +
    diff --git a/src/main/resources/templates/rotate-pdf.html b/src/main/resources/templates/rotate-pdf.html index cd17e8aa..daa0e799 100644 --- a/src/main/resources/templates/rotate-pdf.html +++ b/src/main/resources/templates/rotate-pdf.html @@ -2,7 +2,7 @@ - +
    @@ -13,7 +13,7 @@
    -

    Rotate PDF

    +

    @@ -22,11 +22,10 @@
    + class="custom-file-label" for="fileInput" th:text="#{pdfPrompt}">
    - @@ -34,7 +33,7 @@
    - + diff --git a/src/main/resources/templates/security/add-password.html b/src/main/resources/templates/security/add-password.html index ee106468..fca33e65 100644 --- a/src/main/resources/templates/security/add-password.html +++ b/src/main/resources/templates/security/add-password.html @@ -1,7 +1,7 @@ - +
    @@ -11,85 +11,78 @@
    -

    Add password (Encrypt)

    +

    - +
    + class="custom-file-label" th:text="#{pdfPrompt}">
    -
    - - Higher values are - stronger, but lower values have better compatibility. +
    - +
    + class="form-check-label" for="canAssembleDocument" th:text="#{addPassword.selectText.6}">
    + class="form-check-label" for="canExtractContent" th:text="#{addPassword.selectText.7}">
    + class="form-check-label" for="canExtractForAccessibility" th:text="#{addPassword.selectText.8}">
    + class="form-check-label" for="canFillInForm" th:text="#{addPassword.selectText.9}">
    + for="canModify" th:text="#{addPassword.selectText.10}">
    + class="form-check-label" for="canModifyAnnotations" th:text="#{addPassword.selectText.11}">
    + for="canPrint" th:text="#{addPassword.selectText.12}">
    + class="form-check-label" for="canPrintFaithful" th:text="#{addPassword.selectText.13}">

    - +
    diff --git a/src/main/resources/templates/security/add-watermark.html b/src/main/resources/templates/security/add-watermark.html index c67d8ee1..87974b32 100644 --- a/src/main/resources/templates/security/add-watermark.html +++ b/src/main/resources/templates/security/add-watermark.html @@ -1,7 +1,7 @@ - +
    @@ -11,39 +11,39 @@
    -

    Add Watermark

    +

    - +
    + class="custom-file-label" th:text="#{pdfPrompt}">
    - +
    - +
    - +
    - +
    - +
    - +
    diff --git a/src/main/resources/templates/security/change-permissions.html b/src/main/resources/templates/security/change-permissions.html index bd699185..c8fd659b 100644 --- a/src/main/resources/templates/security/change-permissions.html +++ b/src/main/resources/templates/security/change-permissions.html @@ -1,7 +1,7 @@ - +
    @@ -12,74 +12,65 @@
    -

    Change permissions

    -

    Warning to have these permissions be - unchangeable it is recommended to set them with a password via the - add-password page

    +

    +

    - +
    + name="fileInput">
    - +
    + class="form-check-label" for="canAssembleDocument" th:text="#{permissions.selectText.3}">
    + class="form-check-label" for="canExtractContent" th:text="#{permissions.selectText.4}">
    + class="form-check-label" for="canExtractForAccessibility" th:text="#{permissions.selectText.5}">
    + class="form-check-label" for="canFillInForm" th:text="#{permissions.selectText.6}">
    + for="canModify" th:text="#{permissions.selectText.7}">
    + class="form-check-label" for="canModifyAnnotations" th:text="#{permissions.selectText.8}">
    + for="canPrint" th:text="#{permissions.selectText.9}">
    + class="form-check-label" for="canPrintFaithful" th:text="#{permissions.selectText.10}">

    - +
    diff --git a/src/main/resources/templates/security/remove-password.html b/src/main/resources/templates/security/remove-password.html index af3d6160..28fe91c6 100644 --- a/src/main/resources/templates/security/remove-password.html +++ b/src/main/resources/templates/security/remove-password.html @@ -1,7 +1,7 @@ - +
    @@ -11,22 +11,26 @@
    -

    Remove password (Decrypt)

    +

    - +
    + class="custom-file-label" th:text="#{pdfPrompt}">
    -
    +
    +
    + +
    diff --git a/src/main/resources/templates/split-pdfs.html b/src/main/resources/templates/split-pdfs.html index 7239d985..bad209ac 100644 --- a/src/main/resources/templates/split-pdfs.html +++ b/src/main/resources/templates/split-pdfs.html @@ -1,7 +1,7 @@ - + @@ -14,33 +14,31 @@
    -

    Split PDF

    -

    The numbers you select are the page number you wish to do a - split on

    -

    As such selecting 1,3,7-8 would split a 10 page document into - 6 separate PDFS with:

    -

    Document #1: Page 1

    -

    Document #2: Page 2 and 3

    -

    Document #3: Page 4, 5 and 6

    -

    Document #4: Page 7

    -

    Document #5: Page 8

    -

    Document #6: Page 9 and 10

    +

    +

    +

    +

    +

    +

    +

    +

    +

    + class="custom-file-label" for="fileInput" th:text="#{pdfPrompt}">
    -

    - +