Skip to main content
Participant
June 7, 2018
Question

CAcroPDAnnot multiple issues

  • June 7, 2018
  • 1 reply
  • 494 views

I have three issues with the IAC regarding annotations, here is a code snipped:

CAcroPDPage aPage = PDF.AcquirePage( 0);

for( int i = 0; i < aPage.GetNumAnnots(); i++)

{

     CAcroPDAnnot aAnnot = aPage.GetAnnot( i);

     aAnnot.GetTitle();

     aAnnot.GetContents();

}

First: aAnnot.GetTitle()/GetContents() seems to return the same string for each itteration - but not always.
I tried to overcome this by inserting aAnnot.SetTitle( aAnnot.GetTitle()) which seems to work for now.

Second: GetNumAnnots() returns 3 but there is only 1 Link and 1Text annotation in the File.
I´m wondering why it returns 3. By exampination, GetSubtype() returns "Link" for the first itteration and "Text"
for the next two. When I export the annotations to a FDF file I get the expected one (1) annotation.

Same is true when I browse the annotations in Acrobat.

Third: aAnnot.GetTitle() returns the author and not the title of the annotation.

IAC SDK version is 6, PDF version is 1.5, MS Visual C++ 6.0

Any hints ? Thx.

This topic has been closed for replies.

1 reply

Legend
June 7, 2018

Many annotations have a pop up component which is hidden or combined in the UI but is separate in the Annots array. You can test the type.