Hi I'm using (still) WebViewer 5.1.0. Is there a way to custom handle errors occurring when loading pdfs? For instance, I have a .png file which I renamed to .pdf, thus making it an "invalid pdf". When I try to load it with the webViewer I get an error in the console (which is correct): "Uncaught (in promise) PDF header not found. The file is not a valid PDF document."
I would like to be able to intercept such errors and execute my own callback if possible.
I have added
$(document).on('error', function(e) { //some code })
$(window).on('error', function(e) { //some code })
in my config.js file but none of that works. Is there a chance to set a custom callback?
Best regards
Mirko