diff --git a/src/js/main.js b/src/js/main.js
index 4330e9f..00c5815 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -4,8 +4,7 @@ import whiteboard from "./whiteboard";
import keybinds from "./keybinds";
import Picker from "vanilla-picker";
import { dom } from "@fortawesome/fontawesome-svg-core";
-import pdfjsLib from "pdfjs-dist/build/pdf";
-import pdfjsLibWorker from "pdfjs-dist/build/pdf.worker";
+import pdfjsLib from "pdfjs-dist/webpack";
function main() {
@@ -477,49 +476,47 @@ function main() {
const base64data = reader.result;
uploadImgAndAddToWhiteboard(base64data);
}
- } else if (isPDFFileName(filename)) {
+ } else if (isPDFFileName(filename)) { //Handle PDF Files
var blob = e.originalEvent.dataTransfer.files[0];
- pdfjsLib.GlobalWorkerOptions.workerSrc = pdfjsLibWorker;
var reader = new window.FileReader();
reader.onloadend = function () {
var pdfData = new Uint8Array(this.result);
- var currentDataUrl = null;
- var modalDiv = $('