'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.DrawingImportsGrapeCity.Documents.PdfImportsGrapeCity.Documents.TextImportsGrapeCity.Documents.Pdf.AnnotationsImportsGrapeCity.Documents.Pdf.Actions '' A simple way to create a link to an external URL,'' and associate it with a text on a page.PublicClassLinkToURLFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()Dim page = doc.NewPage()Dim g = page.Graphics '' Draw some text that will represent the link:Dim tl = g.CreateTextLayout() tl.MarginAll = 72 tl.Append("Google google on the wall, please tell me all!",NewTextFormat() With {.Font = StandardFonts.Times, .FontSize = 14}) tl.PerformLayout(True) g.DrawTextLayout(tl, PointF.Empty) '' Add a link associated with the text area: page.Annotations.Add(NewLinkAnnotation(tl.ContentRectangle, NewActionURI("http://www.google.com")))'''' Done: doc.Save(stream)Return doc.Pages.CountEndFunctionEndClass