Debugging "Annotations could not be loaded from the server" error

Skip to first unread message

Anatoly Kudrevatukh

Mar 9, 2016, 7:49:42 PM3/9/16
to PDFTron WebViewer
Q: I am working to integrate the annotations into our application but for some reason, I can’t seem to get annotations to save and load. And everytime I attempt to load I get an error: "Annotations could not be loaded from the server"
What are some of the next steps they can take in debugging?

WebViewer performs basic AJAX requests, like the following (taken from WebViewer/lib/html5/BaseReaderControl.js):
    url: serverUrl,
    cache: false,
    success: function(data) {
        if (!_.isNull(data) && !_.isUndefined(data)) {
        } else {
    error: function(jqXHR, textStatus, errorThrown) {
        /*jshint unused:false */
        console.warn("Annotations could not be loaded from the server.");
    dataType: 'xml'

Fortunately, none of this code is WebViewer-specific.  So to simplify your investigation, you can execute this code in a standalone web page (entirely outside of WebViewer).

Additionally, you should take a look at the returned values jqXHR, textStatus, and errorThrown --- they might contain useful information.  

You can find AJAX request documentation at
Reply all
Reply to author
0 new messages