Hi all,
I am trying to walk the annotations list per page in an existing pdf. I have tried various permutations of the following foreach loops in C#
Code:
foreach (PdfPage page in pdf.Pages)
{
PdfAnnotations annots = page.Annotations;
PdfArray annArray = annots;
foreach (var ann in annArray)
{
}
}
Every variation recives an invalid cast error
Unable to cast object of type 'AnnotationsIterator' to type 'System.Collections.Generic.IEnumerator`1[PdfSharp.Pdf.PdfItem]'
I can get around this by walking the document internal looking for dictionaries that are /Annot /Link. but that looses page affinity.
any thoughts on how to get around this.
Bille