mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-13 11:00:13 +01:00
commit
44e85a1d38
@ -55,7 +55,11 @@
|
|||||||
console.log("loading pdf");
|
console.log("loading pdf");
|
||||||
|
|
||||||
document.querySelector("#editSection").style.display = "";
|
document.querySelector("#editSection").style.display = "";
|
||||||
|
|
||||||
|
const existingPreview = document.getElementById("pdf-preview");
|
||||||
|
if (existingPreview) {
|
||||||
|
existingPreview.remove();
|
||||||
|
}
|
||||||
var url = URL.createObjectURL(fileInput.files[0])
|
var url = URL.createObjectURL(fileInput.files[0])
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdfjs/pdf.worker.js'
|
pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdfjs/pdf.worker.js'
|
||||||
const pdf = await pdfjsLib.getDocument(url).promise;
|
const pdf = await pdfjsLib.getDocument(url).promise;
|
||||||
|
Loading…
Reference in New Issue
Block a user