Load pdf libs when needed (#1902)

* feat: only load pdf-lib when its used

* feat: only load pdfjs when its used
This commit is contained in:
Eric
2024-09-15 00:24:04 -07:00
committed by GitHub
parent d389b5e2f3
commit c6c33d611a
12 changed files with 17 additions and 10 deletions

View File

@@ -49,6 +49,7 @@
</div>
<th:block th:insert="~{fragments/footer.html :: footer}"></th:block>
</div>
<script type="module" th:src="@{'/pdfjs-legacy/pdf.mjs'}"></script>
<script>
const angleInput = document.getElementById("angleInput");
const fileInput = document.getElementById("fileInput-input");
@@ -58,7 +59,7 @@
console.log("loading pdf");
document.querySelector("#editSection").style.display = "";
const existingPreview = document.getElementById("pdf-preview");
if (existingPreview) {
existingPreview.remove();