diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java index 6c934290..458d7230 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/GeneralWebController.java @@ -1,18 +1,9 @@ package stirling.software.SPDF.controller.web; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; -import java.util.stream.Stream; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; @@ -21,11 +12,14 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; - -import io.swagger.v3.oas.annotations.Hidden; -import io.swagger.v3.oas.annotations.tags.Tag; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.Stream; @Controller @Tag(name = "General", description = "General APIs") @@ -80,7 +74,13 @@ public class GeneralWebController { model.addAttribute("currentPage", "merge-pdfs"); return "merge-pdfs"; } - + + @GetMapping("/view-pdf") + @Hidden + public String ViewPdfForm(Model model) { + model.addAttribute("currentPage", "view-pdf"); + return "view-pdf"; + } @GetMapping("/multi-tool") @Hidden diff --git a/src/main/resources/messages_en_US.properties b/src/main/resources/messages_en_US.properties index bc712951..96237592 100644 --- a/src/main/resources/messages_en_US.properties +++ b/src/main/resources/messages_en_US.properties @@ -126,6 +126,9 @@ adminUserSettings.submit=Save User # HOME-PAGE # ############# home.desc=Your locally hosted one-stop-shop for all your PDF needs. +home.viewPdf.title=View PDF +home.viewPdf.desc=View, annotate, add text or images +viewPdf.tags=view,read,annotate,text,image home.multiTool.title=PDF Multi Tool diff --git a/src/main/resources/static/images/book-opened.svg b/src/main/resources/static/images/book-opened.svg new file mode 100644 index 00000000..e642d31a --- /dev/null +++ b/src/main/resources/static/images/book-opened.svg @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/home.html b/src/main/resources/templates/home.html index dcea42b8..72ef3ee7 100644 --- a/src/main/resources/templates/home.html +++ b/src/main/resources/templates/home.html @@ -29,7 +29,8 @@ - + +
diff --git a/src/main/resources/templates/view-pdf.html b/src/main/resources/templates/view-pdf.html new file mode 100644 index 00000000..1338f37d --- /dev/null +++ b/src/main/resources/templates/view-pdf.html @@ -0,0 +1,104 @@ + + + + + + +
+
+
+
+

+
+
+ + Image uploader + + + +

Drag & Drop PDF(s) inside dashed region
or

+ + + + + + + +
+
+ +
+
+
+
+ + + + + + +