Hook into DocumentViewer errors?

31 views
Skip to first unread message

Matt Parizeau

unread,
Oct 2, 2013, 1:19:08 PM10/2/13
to pdfnet-w...@googlegroups.com
Q:

Is there a way to hook into the DocumentViewer object to be notified of errors? In particular a 400 or 500 series server issues, or detecting corrupt documents. Being able to do this for network connectivity would also be great, but we can detect this in other ways if necessary.

A:

Unfortunately there currently isn't a way to hook into DocumentViewer errors.  However initially ReaderControl will do a test to see if byte range requests are supported (in ReaderControl.js see window.ControlUtils.byteRangeCheck(...)) and you could modify this to check for 400 or 500 errors if you like.  Of course you could always implement a similar polling solution to check for network connectivity as well.
Reply all
Reply to author
Forward
0 new messages