How to Replace the Hyperlink url (old url to new url) replace in PDF file only in C#

Dear Team,

How to Replace the Hyperlink url (old url to new url) replace in PDF document file only in C#.

not page wise, i need PDf document wise.
foreach (var pages in pdfDocument.Pages)
{
foreach (LinkAnnotation annot in linkAnnotations)
{
var dat = (annot.Action as GoToURIAction)?.URI;
if (dat != null && dict.ContainsKey(dat))
{
annot.Action = new GoToURIAction(dict[dat]);
isExecuted = true;
}
}
}
i have tried but not working.

Thanks and Regards
Ilaya

@ilaya

Please read the following article about replacing hyperlinks.
Update Links in PDF

Could you please share some more detail about your requirement along with input and expected output PDF files? We will then provide you more information on it.