Null Reference error when using SetAnnotDefaultAuthor

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
jkolpanen
Posts: 4
Joined: Tue Sep 11, 2018 5:12 pm

Null Reference error when using SetAnnotDefaultAuthor

Post by jkolpanen » Tue Sep 11, 2018 5:32 pm

When I assign a default author to the annotations within the DocuViewareAPI, using the SetAnnotDefaultAuthor, I receive the following JavaScript error when I try to use the selected text "Highlight/Strikeout/Underline" options available when right clicking the selection:

Unable to set property 'author' of undefined or null reference

I have been able to recreate it when I try it in the annotations_demo.aspx sample. If I add the following to the existing RegisterOnNewDocumentLoadedOnDocuViewareAPIReady JavaScript function in the sample page, it also breaks the functionality:

DocuViewareAPI.SetAnnotDefaultAuthor('DocuVieware1', 'Test Author', true);

If I remove this line, it works fine. However, I would really like to be able to set the default author and have the in-page functionality.

It appears as thought the JavaScript that appends the annotation cannot find the DocuVieware control. It errors here:

if (e) { e.control.HighlightContextMenu_Click(event);

Thanks.

jkolpanen
Posts: 4
Joined: Tue Sep 11, 2018 5:12 pm

Re: Null Reference error when using SetAnnotDefaultAuthor

Post by jkolpanen » Wed Sep 19, 2018 7:27 pm

The issue has been fixed and will be applied to the next update (per support).

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests