Null Reference error when using SetAnnotDefaultAuthor

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
jkolpanen
Posts: 8
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: 8
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).

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: Null Reference error when using SetAnnotDefaultAuthor

Post by Gabriela » Thu Jan 17, 2019 11:38 am

Hello,

I can confirm that this issue has been fixed in the published release 14.0.67. Please refer to our version history page:
https://www.gdpicture.com/products/version-history/

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest