changeMeta

This commit is contained in:
Anthony Stirling 2023-02-07 22:45:36 +00:00
parent afad672a30
commit e896dfeaec
7 changed files with 55 additions and 21 deletions

View File

@ -29,10 +29,10 @@ import stirling.software.SPDF.utils.PdfUtils;
@Controller
public class MetadataController {
@GetMapping("/remove-metadata")
@GetMapping("/change-metadata")
public String addWatermarkForm(Model model) {
model.addAttribute("currentPage", "remove-metadata");
return "security/remove-metadata";
model.addAttribute("currentPage", "change-metadata");
return "security/change-metadata";
}
@PostMapping("/update-metadata")

View File

@ -1,9 +1,6 @@
###########
# Generic #
###########
# the direction that the language is written (ltr = left to right, rtl = right to left)
language.direction=ltr
pdfPrompt=Choose PDF
multiPdfPrompt=Choose PDFs (2+)
multiPdfDropPrompt=Select (or drag & drop) all PDFs you require
@ -61,8 +58,8 @@ 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.
home.removeMetadata.title=Remove Metadata
home.removeMetadata.desc=Remove unwanted metadata from a PDF document
home.changeMetadata.title=Remove Metadata
home.changeMetadata.desc=Remove unwanted metadata from a PDF document
#Add image
@ -182,11 +179,38 @@ removePassword.selectText.1=Select PDF to Decrypt
removePassword.selectText.2=Password
removePassword.submit=Remove
removeMetadata.title=Remove Metadata
removeMetadata.header=Remove Metadata
removeMetadata.selectText.1=Select PDF to remove metadata from
removeMetadata.selectText.2=Remove document information
removeMetadata.selectText.3=Remove page labels
removeMetadata.selectText.4=Remove XMP Metadata
removeMetadata.selectText.5=Remove annotations
removeMetadata.submit=remove data
changeMetadata.title=Remove Metadata
changeMetadata.header=Remove Metadata
changeMetadata.selectText.1=Select PDF to remove metadata from
changeMetadata.selectText.2=Remove document information
changeMetadata.selectText.3=Remove page labels
changeMetadata.selectText.4=Remove XMP Metadata
changeMetadata.selectText.5=Remove annotations
changeMetadata.submit=remove data

View File

@ -61,6 +61,8 @@ 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.
home.changeMetadata.title=Remove Metadata
home.changeMetadata.desc=Remove unwanted metadata from a PDF document
#Add image
@ -180,6 +182,14 @@ removePassword.selectText.1=Select PDF to Decrypt
removePassword.selectText.2=Password
removePassword.submit=Remove
changeMetadata.title=Remove Metadata
changeMetadata.header=Remove Metadata
changeMetadata.selectText.1=Select PDF to remove metadata from
changeMetadata.selectText.2=Remove document information
changeMetadata.selectText.3=Remove page labels
changeMetadata.selectText.4=Remove XMP Metadata
changeMetadata.selectText.5=Remove annotations
changeMetadata.submit=remove data

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}" th:lang-direction="#{language.direction}" xmlns:th="http://www.thymeleaf.org">
<th:block th:insert="~{fragments/common :: head(title=#{pdfToImage})}"></th:block>
<th:block th:insert="~{fragments/common :: head(title=#{pdfToImage.title})}"></th:block>
<body> <div id="page-container">

View File

@ -45,7 +45,7 @@
<a class="dropdown-item" href="#" th:href="@{remove-password}" th:classappend="${currentPage}=='remove-password' ? 'active' : ''" th:text="#{home.removePassword.title}"></a>
<a class="dropdown-item" href="#" th:href="@{change-permissions}" th:classappend="${currentPage}=='change-permissions' ? 'active' : ''" th:text="#{home.permissions.title}"></a>
<a class="dropdown-item" href="#" th:href="@{add-watermark}" th:classappend="${currentPage}=='add-watermark' ? 'active' : ''" th:text="#{home.watermark.title}"></a>
<a class="dropdown-item" href="#" th:href="@{remove-metadata}" th:classappend="${currentPage}=='remove-metadata' ? 'active' : ''" th:text="#{home.removeMetadata.title}"></a>
<a class="dropdown-item" href="#" th:href="@{change-metadata}" th:classappend="${currentPage}=='change-metadata' ? 'active' : ''" th:text="#{home.changeMetadata.title}"></a>
</div>
</li>

View File

@ -56,7 +56,7 @@
<div th:replace="~{fragments/card :: card(cardTitle=#{home.removePassword.title}, cardText=#{home.removePassword.desc}, cardLink='remove-password')}"></div>
<div th:replace="~{fragments/card :: card(cardTitle=#{home.compressPdfs.title}, cardText=#{home.compressPdfs.desc}, cardLink='compress-pdf')}"></div>
<div th:replace="~{fragments/card :: card(cardTitle=#{home.removeMetadata.title}, cardText=#{home.removeMetadata.desc}, cardLink='remove-metadata')}"></div>
<div th:replace="~{fragments/card :: card(cardTitle=#{home.changeMetadata.title}, cardText=#{home.changeMetadata.desc}, cardLink='change-metadata')}"></div>
</div>
</div>
<div th:insert="~{fragments/footer.html :: footer}"></div>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}" th:lang-direction="#{language.direction}" xmlns:th="http://www.thymeleaf.org">
<th:block th:insert="~{fragments/common :: head(title=#{removeMetadata.title})}"></th:block>
<th:block th:insert="~{fragments/common :: head(title=#{changeMetadata.title})}"></th:block>
<body> <div id="page-container">
<div id="content-wrap">
@ -11,7 +11,7 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<h2 th:text="#{removeMetadata.header}"></h2>
<h2 th:text="#{changeMetadata.header}"></h2>
<form method="post" enctype="multipart/form-data" th:action="@{/update-metadata}">
<div class="form-group">