Hey guys,
currently I'm trying to init my pdf viewer with a base64 string receiving from the server. Somehow it don't want to work, so I searched for a working example of you and found it here:
Your example isn't working on your preview tab and dojo. When inspecting the browser console it is the CORS policy blocking the request of your example. Maybe you can fix it and I can investigate my problem with your example.
Cheers,
Daniel
Update: I found my issue, so my own problem is solved (highlighted below). The base64 string has some special characters and these will be encoded and my base64 string is not valid anymore. Fixed with the @Html.Raw() functionality.
$('#pdfViewer').kendoPDFViewer({ height: 1200, pdfjsProcessing: { file: { data: '@Html.Raw(ViewData["PdfBase64String"])' } }, toolbar: { items: [ { type: 'pager', input: false }, { type: 'zoom', zoomInOut: true }, 'toggleSelection', // 'search', 'download', // 'print' ] }, width: '100%' }).data('kendoPDFViewer');
Well, then this thread is just a note somebody of you to maybe fix your example of the documentation in the link I've posted :-)