Hello,
We're currently in the process of implementing the ability for our application to update annotations through code/business logic and one of the strange things we ran into is in order to get the page that an annotation is on we have to call PdfAnnotation.Document.Pages.IndexOf(PdfAnnotation.Page). It seems like there is probably an easier/better way to do this, so any direction you can provide would be appreciated.
Thanks!
Mike
Finding the page an annotation is on in code
Moderator: Alex
-
- Posts: 56
- Joined: Mon Dec 02, 2019 11:19 pm
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Finding the page an annotation is on in code
Hello Mike,
The PdfAnnotation.Page property returns a PDF page associated with annotation:
https://www.vintasoft.com/docs/vsimagin ... /Page.html
Do you need to get page index in PDF document? If yes, you are using correct code because only PdfPageCollection.IndexOf method can return index of element in collection.
Best regards, Alexander
The PdfAnnotation.Page property returns a PDF page associated with annotation:
https://www.vintasoft.com/docs/vsimagin ... /Page.html
Do you need to get page index in PDF document? If yes, you are using correct code because only PdfPageCollection.IndexOf method can return index of element in collection.
Best regards, Alexander
-
- Posts: 56
- Joined: Mon Dec 02, 2019 11:19 pm
Re: Finding the page an annotation is on in code
We're looking to note the page number of the document that the annotation is on so thanks for confirming we're doing the right thing!