Modifying Annotations

I’m currently playing around with the possibility to modify annotationes as exlained here. However, when I try to do Dim annotation As New InteractiveFeatures.Annotations.Annotation as in the second example, or .FreeTextAnnotation as in the first, I get various error messages:

In case #1 I get that no “new” is available and Visual Studio suggests to remove New, which obviously doesn’t work as it provokes a null pointer exception. In case #2 it says there is no empty constructor for FreeTextAnnotation. I can replace the empty constructor with one requiring parametres in the latter case, but still the tutorial is wrong. It then also says that using InteractiveFeatures.Annotations.Annotation is deprecated and I should use Annotation instead. But which Annotation? Where is it from? Neither pages lists the packages that have to be imported.

Can anyone help?

Hi Sorin,


Thanks for contacting support and sharing your feedback.

The articles which you have indicated are related to old Aspose.Pdf.Facades approach and there have been numerous changes in API since they were drafted. Furthermore, all the new enhancements/improvements are being made in new Document Object Model of Aspose.Pdf namespace. Therefore we recommend you to try using the new DOM while Working with Annotations

Meanwhile I have updated the code snippet on both pages. In case of any further query, please feel free to contact.