Here a suggestion to save all page annot to an xml file structure:
- Create X memoryStream (X is your number of page)
- Load the document using an AnnotationManager object (see sample above)
- using the annotationManager object, brows all page and save each page annot content to the good stream.
At this stage you will have all annotation information stored in memory stream, one stream per page. So you have to create your own file structure that you can write/parse. XML is a good option.
IE:
- Code: Select all
<GdPictureAnnotationsContainer>
<PageAnnots>
<PageNo>1</PageNo>
<Content> [CONTENT OF THE FIRST STREAM HERE] </Content>
</PageAnnots>
<PageAnnots>
<PageNo>2</PageNo>
<Content> [CONTENT OF THE SECONDSTREAM HERE] </Content>
</PageAnnots>
</GdPictureAnnotationsContainer>
To write & parse the XML file, i suggest you to use the XmlTextReader class. You will find lof of example over the web to use it.
Kind regards,
Loïc
</myAnnotationContainer>