I'm following some of the most basic kendoPDFViewer examples, and this section of code in the js file consistently crashes;
var pdfViewer = $("#documentViewer").data("kendoPDFViewer");
if (!pdfViewer) {
pdfViewer = $("#documentViewer").kendoPDFViewer({ //<------crashes here
pdfjsProcessing: {
file: ""
},
width: "100%",
height: 500
}).data("kendoPDFViewer");
}
#documentViewer is the id of the div I'm attempting to attach the viewer to. Debugging shows the problem happening when I try to declare the currently null pdfViewer as a kendoPDFViewer. I made sure to include the pdf scrips in my index.html as well.
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<script> window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js';</script>
Am I putting the scripts in the wrong location or something?
Thanks.