From a12643194a0899a5d924589fbe4c734b37888948 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:19:52 +0100 Subject: [PATCH] changes --- .../api/RearrangePagesPDFController.java | 2 +- .../api/security/PasswordController.java | 2 +- .../software/SPDF/utils/PdfUtils.java | 2 +- src/main/resources/messages_en_GB.properties | 3 + src/main/resources/static/images/pipeline.svg | 3 + .../resources/templates/fragments/navbar.html | 7 ++ src/main/resources/templates/home.html | 1 + src/main/resources/templates/pipeline.html | 76 ++++++++++++------- 8 files changed, 67 insertions(+), 29 deletions(-) create mode 100644 src/main/resources/static/images/pipeline.svg diff --git a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java index 1620f071..d3544007 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/RearrangePagesPDFController.java @@ -151,7 +151,7 @@ public class RearrangePagesPDFController { } @PostMapping(consumes = "multipart/form-data", value = "/rearrange-pages") - @Operation(summary = "Rearrange pages in a PDF file", description = "This endpoint rearranges pages in a given PDF file based on the specified page order or custom mode. Users can provide a page order as a comma-separated list of page numbers or page ranges, or a custom mode.") + @Operation(summary = "Rearrange pages in a PDF file", description = "This endpoint rearranges pages in a given PDF file based on the specified page order or custom mode. Users can provide a page order as a comma-separated list of page numbers or page ranges, or a custom mode. Input:PDF Output:PDF") public ResponseEntity rearrangePages( @RequestPart(required = true, value = "fileInput") @Parameter(description = "The input PDF file to rearrange pages") MultipartFile pdfFile, @RequestParam(required = false, value = "pageOrder") @Parameter(description = "The new page order as a comma-separated list of page numbers, page ranges (e.g., '1,3,5-7'), or functions in the format 'an+b' where 'a' is the multiplier of the page number 'n', and 'b' is a constant (e.g., '2n+1', '3n', '6n-5')") String pageOrder, diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java index 0051b411..ecc27def 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/PasswordController.java @@ -44,7 +44,7 @@ public class PasswordController { @PostMapping(consumes = "multipart/form-data", value = "/add-password") @Operation( summary = "Add password to a PDF file", - description = "This endpoint adds password protection to a PDF file. Users can specify a set of permissions that should be applied to the file." + description = "This endpoint adds password protection to a PDF file. Users can specify a set of permissions that should be applied to the file. Input:PDF Output:PDF" ) public ResponseEntity addPassword( @RequestPart(required = true, value = "fileInput") diff --git a/src/main/java/stirling/software/SPDF/utils/PdfUtils.java b/src/main/java/stirling/software/SPDF/utils/PdfUtils.java index e5d35c08..67e6f807 100644 --- a/src/main/java/stirling/software/SPDF/utils/PdfUtils.java +++ b/src/main/java/stirling/software/SPDF/utils/PdfUtils.java @@ -43,7 +43,7 @@ public class PdfUtils { // Create images of all pages for (int i = 0; i < pageCount; i++) { - images.add(pdfRenderer.renderImageWithDPI(i, 300, colorType)); + images.add(pdfRenderer.renderImageWithDPI(i, DPI, colorType)); } if (singleImage) { diff --git a/src/main/resources/messages_en_GB.properties b/src/main/resources/messages_en_GB.properties index c8f1ae13..083bc8b6 100644 --- a/src/main/resources/messages_en_GB.properties +++ b/src/main/resources/messages_en_GB.properties @@ -131,6 +131,9 @@ home.pageLayout.desc=Merge multiple pages of a PDF document into a single page home.scalePages.title=Adjust page size/scale home.scalePages.desc=Change the size/scale of a page and/or its contents. +home.pipeline.title=Pipeline +home.pipeline.desc=Pipeline desc. + error.pdfPassword=The PDF Document is passworded and either the password was not provided or was incorrect downloadPdf=Download PDF diff --git a/src/main/resources/static/images/pipeline.svg b/src/main/resources/static/images/pipeline.svg new file mode 100644 index 00000000..48722d0c --- /dev/null +++ b/src/main/resources/static/images/pipeline.svg @@ -0,0 +1,3 @@ + + + \ 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 987b6d0e..793de25b 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -32,6 +32,13 @@ + +