I'm using Kendo's JQuery PDFViewer control to display PDF files inline in a web page. The control is launched into a modal popup via a piece of JavaScript, thusly:
var launchPDFModal = function (param1, param2, param3) {
var pdfViewer = $("#pdfViewer").data("kendoPDFViewer");
if (!pdfViewer) {
pdfViewer = $("#pdfViewer").kendoPDFViewer({
pdfjsProcessing: {
file: "" },
width: "100%",
height: "85vh",
toolbar: {
items: [
"pager", "zoom", "search", "download", "print" ]
},
messages: {
defaultFileName: param1
}
}).data("kendoPDFViewer");
}
var pdfHandlerUrl = "/api/pdfViewer/" + param1 + "/" + param2 + "/" + param3;
pdfViewer.fromFile(pdfHandlerUrl);
$("#pdfViewerModal").show();
}
The three params are used to identify the file to be shown and file is returned as a stream as the files are stored in data and not as files on a drive. I have verified the references to the Kendo library, pdf.js and pdf.worker.js are all correct as required.
The PDF file loads and displays just fine in the control. The download button also successfully saves the file to the local drive. However, when I click the print button, and the print preview shows up, it has the correct number of pages, but they are all blank. Trying the actual print, just prints blank pages. Browser doesn't matter. I've tried Chrome, Edge, and Firefox. Same thing. I've also verified that it's not an ad blocker (neither Edge nor Firefox installs have any plugins on them).