Posted by a ceTe Software moderator
Hello,
Yes, you can add hyper links to the PDF document without any problem using our DynamicPDF Generator for .NET product. You will need to use the Link page element and set the UrlAction to it. You can refer documentation on Link page element
here. You can also refer documentation on Action class
here. Below is the sample code for it.
string strUrl = "http://www.dynamicpdf.com";
Font font = Font.Helvetica;
float textWidth = font.GetTextWidth(strUrl, 10);
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
Label label=new Label(strUrl,100,100,textWidth,20,font,10,RgbColor.Blue);
page.Elements.Add(label);
UrlAction action = new UrlAction(strUrl);
Link link = new Link(100, 100, textWidth, 20, action);
page.Elements.Add(link);
document.Draw(@"C:\MyDocument.pdf");
Thanks,
ceTe Software Support Team.