Page Number of Annotation

Discussions about annotation support.
Post Reply
jkolpanen
Posts: 4
Joined: Tue Sep 11, 2018 5:12 pm

Page Number of Annotation

Post by jkolpanen » Wed Sep 12, 2018 1:04 pm

Is there a way in which to capture the page number of which an annotation resides?

We are looking to build an external list of all annotations that reside within a document, and would like to be able to reference which page they reside, so that we can quickly guide the user back to the annotation within the document.

I have looked through all of the documentation that I can find and have combed through the forums, but I haven't seen a way to reference this information. I do see "PageNo" in the xmp file, but cannot find a way to reference it.

Thanks.

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

Re: Page Number of Annotation

Post by jkolpanen » Mon Oct 29, 2018 4:40 pm

Here is the answer to the question, Support assisted with this.

Code: Select all

//Capture Document
if (dvContracts.GetNativePDF(out GdPicture14.GdPicturePDF gdPic) == GdPicture14.GdPictureStatus.OK)
{
	//Initialize Annotation Manager
	using (GdPicture14.AnnotationManager annMgr = new GdPicture14.AnnotationManager())
	{
		//Capture Annotations
		if (annMgr.InitFromGdPicturePDF(gdPic) == GdPicture14.GdPictureStatus.OK)
		{
			//Loop through Document Pages
			for (var p = 1; p <= annMgr.PageCount; p++)
			{
				//"p" represents the page number
			
				//Capture Annotations on page
				if (annMgr.SelectPage(p) == GdPicture14.GdPictureStatus.OK)
                                {
					//"p" represents the page number
				}
			}
		}
	}
}

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests