PdfViewer question

1 Answer 568 Views
PDFViewer
Dome
Top achievements
Rank 1
Dome asked on 11 Oct 2021, 04:31 PM | edited on 12 Oct 2021, 08:04 AM

 

Hi I'm using PdfViewer on a a view and it works fine. The page contains a grid with more than one pdf file link and everithing works fine loading the viewer when grid select other lines.

I face a problem when the PDF file is occasionally corrupted, (rare case but can happen). In this case PdfViewer shows an error dialog "PDF file fails to process" and this is right. But after that error the PdfViewer object on the page become corrupted and show in console:


kendo.pdfviewer.js:1885 
        
       Uncaught TypeError: Cannot read properties of undefined (reading 'canvas')
    at r._calculateZoom (kendo.pdfviewer.js:1885)
    at r.exec (kendo.pdfviewer.js:1840)
    at init.execute (kendo.pdfviewer.js:2435)
    at init.zoom (kendo.pdfviewer.js:2425)
    at init.fromFile (kendo.pdfviewer.js:2502)
    at init.grid_row_select (VisDocForni?CodFor=000623:348)
    at init.trigger (kendo.all.js:164)
    at init.change (kendo.all.js:67990)
    at init.trigger (kendo.all.js:164)
    at init._notify (kendo.all.js:30078)

for any other valid PDF loading request, unless I refresh the page. I don't know how to reset PdfViewer in the "Error" event when it happens.

Thanks

Dome

 

1 Answer, 1 is accepted

Sort by
0
Aleksandar
Telerik team
answered on 14 Oct 2021, 11:21 AM

Hi Dome,

Thank you for reaching out. Indeed I was able to reproduce the behavior where trying to open a valid PDF file after trying to open one that was corrupted throws an error and the component becomes irresponsive. I observed a different error than the reported so I will appreciate it if you can share a file that causes the reported error.

That said I have logged a Bug report on your behalf and you can view the item in the public repository here:

https://github.com/telerik/kendo-ui-core/issues/6604

You can monitor the item above for details on the issue. 

Finally, I have updated your Telerik points as a token of gratitude for helping us identify this issue.

Regards,
Aleksandar
Progress Telerik

Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.
Tags
PDFViewer
Asked by
Dome
Top achievements
Rank 1
Answers by
Aleksandar
Telerik team
Share this question
or