Am trying to insert hyperlink to another website in pdf

I use this code:

 Page page = (Page)doc.Pages[1];
 var text = new TextFragment("index");
 text.Position = new Position(200, 300);
 Aspose.Pdf.WebHyperlink link = new 
 WebHyperlink("www.google.com");
 text.Hyperlink = link;
 page.Paragraphs.Add(text);

but new Position(200, 300); values not responding.

@kristijanpos1

Would you please share your sample PDF document which you are using as input in your code snippet. We will test the scenario in our environment and address it accordingly.