Hi,
1. I have checked and found that with the file named "File4_TextNotes.pdf" . Annotation are extracted. with the code :
PdfContentEditor editor = new PdfContentEditor();
string TestPath = @"D:\AsposeTest\TestData\";
editor.BindPdf(TestPath + "File4_FreeTextNotes.pdf");
string[] annotType ={ "Text", "Highlight" };
ArrayList annotList = editor.ExtractAnnotations(1, 2, annotType);
for (int i = 0; i < annotList.Count; i++)
{
Hashtable currentNode = (Hashtable)annotList[i];
object partValue = null;
foreach (string partName in currentNode.Keys)
{
partValue = currentNode[partName];
if (partValue is string)
{
Console.WriteLine(partName + ":" + currentNode[partName].ToString());
}
}
foreach (string partName in currentNode.Keys)
{
partValue = currentNode[partName];
if (partValue is Hashtable)
{
Console.WriteLine(partName);
Hashtable hashTable = (Hashtable)partValue;
if (partName.Equals("contents-richtext"))
Console.WriteLine(hashTable["Rc"].ToString().Substring(21));
else
{
foreach (string name in hashTable.Keys)
{
Console.WriteLine(name + ":" + hashTable[name].ToString());
}
}
}
}
}
Console.ReadKey(false);
2. I have checked with the file named "File4_FreeTextNotes.pdf"and found that it is not the noteType we support but it is the Text Box. I will discuss this issue with the developer and will let you know as soon as solution is found.
Thanks.
Adeel Ahmad
Support Developer
Aspose Changsha Team
http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html