Product Bundles
DevCraft
All Telerik .NET and Kendo UI JavaScript components and AI Tools in one package.
Kendo UI
Bundle of AI Tools plus four JavaScript UI libraries built natively for jQuery, Angular, React and Vue.
Build JavaScript UI
Javascript
Telerik
Build modern .NET business apps
.Net Web
Cross-Platform
Desktop
Reporting and Documents
AI for Developers & IT
Ensure AI program success
AI Coding
AI Engineering
Additional Tools
Enhance the developer and designer experience
Testing & Mocking
Debugging
AI-Enhanced UI Tools
CMS
Free Tools
Support
Resources
Free Assets and Tools
Design and Productivity Tools
Hello Dide,
Thank you for reaching out to us.
The PDF Viewer is not available in the KendoReact suite, but it is in our planning and you can follow its progress in the link below:
The target release date is Jan 15, 2023.
Best Regards, Konstantin Dikov Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Thanks for your quick reply! I will keep an eye on the progress.
For now, is there a way I can use the Kendo UI for jquery PDF viewer in my react app?
I've added the following but getting the error:
pdfjsLib.GlobalWorkerOptions.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjsLib.version}/pdf.worker.js`; export default class KendoPdf extends Component { kendoPDFViewerInstance: any; componentDidMount() { if (typeof window !== 'undefined') { this.kendoPDFViewerInstance = $('#pdfviewer').kendoPDFViewer({ pdfjsProcessing: { file: '/test-doc.pdf', }, }); } } componentWillUnmount() { this.kendoPDFViewerInstance.destroy(); $('#pdfviewer').empty(); } render() { return ( <div> <p>pdfviewer</p> <div id="pdfviewer"></div> </div> ); } }
Hi Dide,
I have tested the scenario and it seems that the error in question can be observed if the PdfViewer is initialized before the PDF.JS scripts are loaded.
Loading the scripts directly seems to resolve the problem:
<head> <link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/5.8.0/default/default-ocean-blue.css"></link> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2022.3.913/styles/kendo.default-ocean-blue.min.css" /> <script src="https://kendo.cdn.telerik.com/2022.3.913/js/jquery.min.js"></script> <script src="https://kendo.cdn.telerik.com/2022.3.913/js/kendo.all.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js"></script> </head>
And here is an example:
Please give this a try and let me know if everything is working correctly on your side too.