I am trying to figure out how to add a simple hyperlink or weblink (not sure what the diff is) onto my pdf document.
Here is my code. in the end i would prefer a link that goes to Google.Com and has text Click Here for Goolge.
I can't find any good examples of how to do this.
using (XGraphics gfx = XGraphics.FromPdfPage(page))
{
XRect rec = gfx.Transformer.WorldToDefaultPage(new XRect(new XPoint(30, 60), new XSize(30, 30)));
PdfRectangle rect = new PdfRectangle(rec);
PdfLinkAnnotation link = PdfLinkAnnotation.CreateWebLink(rect, "www.google.com");
page.Annotations.Add(link);
page.AddWebLink(rect, "www.google.com");
gfx.DrawRectangle(XPens.Black, XBrushes.Black, link.ToString());
}