From 44f9313012bcdb0ea2331c9995eb2aceabd16fca Mon Sep 17 00:00:00 2001 From: foiv Date: Tue, 14 May 2024 12:11:30 +0300 Subject: [PATCH 1/5] Fix Rotation function --- src/main/resources/templates/rotate-pdf.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/resources/templates/rotate-pdf.html b/src/main/resources/templates/rotate-pdf.html index 5446ff92..70e6bca5 100644 --- a/src/main/resources/templates/rotate-pdf.html +++ b/src/main/resources/templates/rotate-pdf.html @@ -55,7 +55,11 @@ console.log("loading pdf"); document.querySelector("#editSection").style.display = ""; - + + const existingPreview = document.getElementById("pdf-preview"); + if (existingPreview) { + existingPreview.remove(); + } var url = URL.createObjectURL(fileInput.files[0]) pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdfjs/pdf.worker.js' const pdf = await pdfjsLib.getDocument(url).promise; From 3fa41e058ad38d13e3006f43f94c85c9bdcf36ba Mon Sep 17 00:00:00 2001 From: Urjeet Patel <1077440+urjeetpatel@users.noreply.github.com> Date: Tue, 14 May 2024 16:43:18 +0000 Subject: [PATCH 2/5] fix: Remove Redundant Back to Main Page Button Remove Redundant Back to Main Page Button. this fixes #489 Closes #489 --- src/main/resources/templates/view-pdf.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/resources/templates/view-pdf.html b/src/main/resources/templates/view-pdf.html index 5d08d597..e14163be 100644 --- a/src/main/resources/templates/view-pdf.html +++ b/src/main/resources/templates/view-pdf.html @@ -185,11 +185,6 @@ See https://github.com/adobe-type-tools/cmap-resources