You are viewing limited content. For full access, please sign in.

Question

Question

Get Annotations On A Page

SDK
asked on November 30, 2021

I'm trying to get annotations on a particular page of a document. I don't see a method that allows me to specify a single page when getting an annotation. Is there such a method? If so, could someone provide a little sample code? I just see GetForPage, but that doesn't appear to be exposed. Thank you.

0 0

Answer

SELECTED ANSWER
replied on November 30, 2021 Show version history

Right, the DocumentInfo class just has the GetAnnotations() call that doesn't have a way to specify the page(s) you are interested in. There is a GetAnnotations() function on PageInfo that just returns that page's annotations, and you can get a PageInfo from a DocumentInfo.

1 0
replied on November 30, 2021

I suspected that might be the case. Thank you.

0 0
replied on November 30, 2021

Do you have an idea as to why I'm getting the error Specified agruement was out of the range of valid values. Paramter name: page set? I get it when I'm running the Script editor in Workflow with the following code on a document that has four pages.

 

DocumentInfo DI = new DocumentInfo(BoundEntryId,RASession);
PageInfo PI = DI.GetPageInfo(2);

 

0 0
replied on November 30, 2021

If you are trying to access an existing document, you should use Document.GetDocumentInfo().

0 0
replied on December 2, 2021

If this is WF, then you already have an EntryInfo for the entry the script is set to use. So go with:

DocumentInfo di = (DocumentInfo)this.BoundEntryInfo;

 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.