Skip to content

Commit

Permalink
Merge pull request #2501 from Ludy87/missing_pdflib
Browse files Browse the repository at this point in the history
[Bugfix] A variety of tools miss PDFLib
  • Loading branch information
Frooodle authored Dec 18, 2024
2 parents 0436f45 + 164381e commit 4e715a8
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/main/resources/templates/convert/pdf-to-csv.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<canvas id="overlayCanvas" style="position: absolute; top: 0; left: 0; z-index: 2; width: 100%"></canvas>
</div>
<script type="module" th:src="@{'/pdfjs-legacy/pdf.mjs'}"></script>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
<script type="module" th:src="@{'/js/pages/pdf-to-csv.js'}">
</script>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/fragments/common.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
<script>
window.stirlingPDF = window.stirlingPDF || {};
</script>
<script th:src="@{'/js/fetch-utils.js'}"></script>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
<script th:src="@{'/js/fetch-utils.js'}"></script>
<!-- jQuery -->
<script th:src="@{'/js/thirdParty/jquery.min.js'}"></script>
<script th:src="@{'/js/thirdParty/jquery.validate.min.js'}"></script>
Expand Down Expand Up @@ -61,7 +62,6 @@

<link rel="preload" th:href="@{'/fonts/google-symbol.woff2'}" as="font" type="font/woff2" crossorigin="anonymous">


<script th:src="@{'/js/thirdParty/fontfaceobserver.standalone.js'}"></script>

<!-- Google MD Icons -->
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/merge-pdfs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<head>
<th:block th:insert="~{fragments/common :: head(title=#{merge.title}, header=#{merge.header})}"></th:block>
<link rel="stylesheet" th:href="@{'/css/merge.css'}">
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
</head>

<body>
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/misc/add-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<!-- draggables box -->
<div id="box-drag-container" class="show-on-file-selected">
<canvas id="pdf-canvas"></canvas>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
<script th:src="@{'/js/draggable-utils.js'}"></script>
<div class="draggable-buttons-box ignore-rtl">
<button class="btn btn-outline-secondary" onclick="DraggableUtils.deleteDraggableCanvas(DraggableUtils.getLastInteracted())">
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/misc/adjust-contrast.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ <h4><span th:text="#{adjustContrast.saturation}"></span> <span id="saturation-va
</div>
</form>
<script type="module" th:src="@{'/pdfjs-legacy/pdf.mjs'}"></script>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
<script type="module" th:src="@{'/js/pages/adjust-contrast.js'}"></script>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/misc/extract-images.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html th:lang="${#locale.language}" th:dir="#{language.direction}" th:data-language="${#locale.toString()}" xmlns:th="https://www.thymeleaf.org">
<head>
<th:block th:insert="~{fragments/common :: head(title=#{extractImages.title}, header=#{extractImages.header})}"></th:block>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
</head>

<body>
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/misc/remove-annotations.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
</div>
<th:block th:insert="~{fragments/footer.html :: footer}"></th:block>
</div>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
<script th:src="@{'/js/local-pdf-input-download.js'}"></script>
<script>
document.getElementById('pdfForm').addEventListener('submit', async (e) => {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/misc/replace-color.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

<head>
<th:block th:insert="~{fragments/common :: head(title=#{replace-color.title}, header=#{replace-color.header})}"></th:block>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
</head>

<body>
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/multi-tool.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ <h5 th:text="#{multiTool.selectedPages}" style="white-space: nowrap; margin-righ
<th:block th:insert="~{fragments/footer.html :: footer}"></th:block>
</div>
<script type="module" th:src="@{'/pdfjs-legacy/pdf.mjs'}"></script>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
<script>
window.selectedPages = [];
window.selectPage = false;
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/overlay-pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html th:lang="${#locale.language}" th:dir="#{language.direction}" th:data-language="${#locale.toString()}" xmlns:th="https://www.thymeleaf.org">
<head>
<th:block th:insert="~{fragments/common :: head(title=#{split-by-size-or-count.title}, header=#{split-by-size-or-count.header})}"></th:block>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
</head>

<body>
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/templates/pipeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
th:href="@{'/css/pipeline.css'}"
th:if="${currentPage == 'pipeline'}"
/>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
<script th:inline="javascript">
const saveSettings = /*[[#{pipelineOptions.saveSettings}]]*/ "";
const deletePipelineText = /*[[#{pipeline.deletePrompt}]]*/ "Are you sure you want to delete pipeline";
Expand Down Expand Up @@ -194,7 +193,7 @@
</div>
</div>
<script th:src="@{'/js/fetch-utils.js'}"></script>
<script th:src="@{'/js/pipeline.js'}"></script>\
<script th:src="@{'/js/pipeline.js'}"></script>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/templates/sign.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ <h5 th:text="#{sign.sharedSigs}"></h5>
<!-- draggables box -->
<div id="box-drag-container" class="show-on-file-selected">
<canvas id="pdf-canvas"></canvas>
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
<script th:src="@{'/js/draggable-utils.js'}"></script>
<div class="draggable-buttons-box ignore-rtl">
<button class="btn btn-outline-secondary"
Expand Down

0 comments on commit 4e715a8

Please sign in to comment.