Hi,
I would like to make existing annots action as none in aspose. When I split the document into multiple files, existing annots shows with goto action without target page, if the target page does not exists. I want to make those annots as null. I have attached the document and in page number 6.test.pdf (48.2 KB)
I am using below code snippet to extract those annots and make action as none.
IList list = selector.Selected;
foreach (LinkAnnotation linkannot in list)
{
string Aname = linkannot.GetType().Name;
if (Aname.Equals("LinkAnnotation"))
{
actiontype = action.GetType().Name;
if (actiontype.Equals("GoToAction"))
{
GoToAction gotoaction = null;
gotoaction = (GoToAction)annot.Action;
ExplicitDestination destination = (ExplicitDestination)gotoaction.Destination;
int ipage = destination.PageNumber;
if (ipage == 0)
annot.Action = null;
}
But this code is not working to make action null. Please let me know how can I make action none for these types of annots.
Thanks in advance,
Sow