New to Kendo UI for jQuery? Download free 30-day trial

PDFjs Processing

By default, if no processing configuration is defined, the PDFViewer uses the PDF.js library.

PDF.js is an open-source project that is developed by Mozilla.

Requirements

The following table showcases the compatibility between Kendo UI and the PDFJS library. Versions before Kendo UI 2024.4.1112 are not compatible with PDFJS 4.x.

Major Releases Compatible PDFJS Versions
Kendo UI 2024.4.1112 (2024 Q4) 4.3.136
Kendo UI 2024.3.1015 3.x, 2.x

Configuring with Kendo UI v2024.4.1112 and Later

Starting with v2024.4.1112(2024 Q4), the PDFViewer requires PDFJS version 4.x.x or later.

The following example demonstrates how to configure the PDFViewer to use PDF.js processing with versions starting with 4.x.x

    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.3.136/pdf.mjs" type="module"></script> <!-- Include pdf.js before the kendo scripts -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.3.136/pdf.worker.mjs" type="module"></script> <!-- Include pdf.worker.js before the kendo scripts -->
    <script src="https://code.jquery.com/jquery-3.7.0.min.js" type="module"></script>
    <script src="https://kendo.cdn.telerik.com/2024.4.1112/js/kendo.all.min.js" type="module"></script>

    <div id="pdfviewer"></div>
    <script type="module">
        $("#pdfviewer").kendoPDFViewer({
            pdfjsProcessing: {
                file: ""
            }
        });
    </script>

Configuring with Kendo UI v2024.3.1015 and Earlier

Versions of Kendo UI before v2024.4.1112 are not compatible with version 4.x of PDFJS. You must use either PDFJS 2.x or 3.x.

The following example demonstrates how to configure the PDFViewer to use PDF.js processing with versions prior to 4.x.x.

<div id="pdfviewer"></div>
<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>
<script>
    $("#pdfviewer").kendoPDFViewer({
        pdfjsProcessing: {
            file: ""
        }
    });
</script>

See Also

In this article