Hi,
I am trying to set hyperlink color to existing pdf file using below code, after below code execution hyperlink work ok but color of text on which i set the hyper link was not change to blue.
Document doc = new Document(“filename”);
float shapeX = (shapes[i].x * 72 / 150) / (float)Convert.ToDouble(shapes[i].ratio);
float shapeY = (shapes[i].y * 72 / 150) / (float)Convert.ToDouble(shapes[i].ratio);
float shapeW = (shapes[i].w * 72 / 150) / (float)Convert.ToDouble(shapes[i].ratio);
float shapeH = (shapes[i].h * 72 / 150) / (float)Convert.ToDouble(shapes[i].ratio);
double yaxis = (float)(doc.Pages[shapes[i].p].Rect.URY - (shapeH + shapeY));
Page page = doc.Pages[shapes[i].p];
// Create Link annotation object
LinkAnnotation link = new LinkAnnotation(page, new Aspose.Pdf.Rectangle(shapeX, yaxis, shapeW + shapeX, yaxis + shapeH));
// Create border object for LinkAnnotation
Border border = new Border(link);
// Set the border width value as 0
border.Width = 0;
// Set the border for LinkAnnotation
link.Border = border;
link.Color = Aspose.Pdf.Color.Blue;
link.Action = new GoToURIAction(url);
page.Annotations.Add(link);
doc.Pages[shapes[i].p].Annotations.Add(textAnnotation);
doc.Save(“filename”);
Please let me know is there anything missing?