Merge remote-tracking branch 'origin/main' into redesign

This commit is contained in:
Anthony Stirling
2024-05-18 13:53:34 +01:00
9 changed files with 1105 additions and 42 deletions

View File

@@ -58,7 +58,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;