We would like to be able to specify different error messages/error pages to present to the user based on the conversion or PrizmDoc issue. For example, if the file type isn’t supported, we’d like to show message A, but if there’s some memory/size issue, we’d like to show message B.
Need the ability to intercept error messages from PrizmDoc server to the viewer so they can display a web page with a custom error message to the user.
Our samples illustrate how do to his.
The samples use a reverse proxy to facilitate communication between the viewer and PAS which gives the developer a way to intercept messages before the message gets to the viewer. You could modify the proxy code to return your own custom message to your front end. Or, since it sounds like you want to do this before even showing the viewer, you could create the viewing session in your server-side code, see if an error gets returned, and redirect to the error page.
If you want to do something when a page fails to load (after the viewer has been loaded) you could subscribe to the PageLoadFailed event and redirect the user to an error page when that happens. (We have a bunch of events some of which relate to errors you could handle however they want.)
Attachments Open full size