Unable to update the Font name of the existing annotation in a PDF file

Hi,
I am following this article. Unable to set the font name or size. Getting error as

System.IndexOutOfRangeException: ‘Invalid index: index should be in the range [1…n] where n equals to the annotations count.’

Can you tell me how to change the font of the existing free text annotation?

@Sri79,

Can you share the pdf document you are trying to modify?

I won’t ask for the code snippet because I am assuming you are doing the exactly same thing as the sample shows. If it is any different, can you please share it too?