This commit is contained in:
Anthony Stirling
2023-05-12 14:02:37 +01:00
parent a647347e10
commit c4d1761687
8 changed files with 269 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
<html th:lang="${#locale.toString()}" th:lang-direction="#{language.direction}" xmlns:th="http://www.thymeleaf.org">
<th:block th:insert="~{fragments/common :: head(title=#{repair.title})}"></th:block>
<th:block th:insert="~{fragments/common :: head(title=#{compare.title})}"></th:block>
<body>
@@ -13,20 +13,20 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-9">
<h2 th:text="#{repair.header}"></h2>
<h2 th:text="#{compare.header}"></h2>
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
<div th:replace="~{fragments/common :: fileSelector(name='fileInput2', multiple=false, accept='application/pdf')}"></div>
<button onclick="comparePDFs()">Compare</button>
<button class="btn btn-primary" onclick="comparePDFs()" th:text="#{compare.submit}"></button>
<div class="row">
<div class="col-md-6">
<h3>Document 1</h3>
<h3 th:text="#{compare.document.1}"></h3>
<div id="result1" class="result-column"></div>
</div>
<div class="col-md-6">
<h3>Document 2</h3>
<h3 th:text="#{compare.document.2}"></h3>
<div id="result2" class="result-column"></div>
</div>
</div>

View File

@@ -17,14 +17,14 @@
<form id="multiPdfForm" th:action="@{remove-blanks}" method="post" enctype="multipart/form-data">
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
<div class="form-group">
<label for="threshold">Threshold:</label>
<label for="threshold" th:text="#{removeBlanks.threshold}"></label>
<input type="number" class="form-control" id="threshold" name="threshold" value="10">
<small id="thresholdHelp" class="form-text text-muted">Threshold for determining how white a white pixel must be)</small>
<small id="thresholdHelp" class="form-text text-muted" th:text="#{removeBlanks.thresholdDesc}"></small>
</div>
<div class="form-group">
<label for="whitePercent">White Percent (%):</label>
<label for="whitePercent" th:text="#{removeBlanks.whitePercent}"></label>
<input type="number" class="form-control" id="whitePercent" name="whitePercent" value="99">
<small id="whitePercentHelp" class="form-text text-muted">Percent of page that must be white to be removed</small>
<small id="whitePercentHelp" class="form-text text-muted" th:text="#{removeBlanks.whitePercentDesc}"></small>
</div>
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{removeBlanks.submit}"></button>
</form>
@@ -35,4 +35,5 @@
<div th:insert="~{fragments/footer.html :: footer}"></div>
</div>
</body>
</html>
</html>