Page Number of Annotation

Discussions about annotation support.
Post Reply
jkolpanen
Posts: 8
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: 8
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
				}
			}
		}
	}
}

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Page Number of Annotation

Post by Loïc » Tue Jan 15, 2019 11:01 am

Thanks for sharing this! :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest