Parameters
- url
- Link destination (can be a Url, a file name, or a local link destination).
- page
- Index of the page that contains the hyperlink
- rc
- Area on the page that will behave as a link (expressed in points, from the top-left corner of the page).
Hyperlinks can be external (Urls and file names) or local (other locations within the same document).
Local links are useful when you want to implement some type of cross-referencing within the document, such as a table of contents or an index. Local links are identical to regular hyperlinks, except for two things:
1) The url parameter must start with a "#", and
2) You must specify the target location for the link using the AddTarget method.
Note that the AddLink method does not add any visible content to the page, so you will usually need another command along with AddLink to specify some text or an image that the user can see, as the example below demonstrates.
Rect rc = new Rect(50, 50, 100, 15); // RectangleF Font font = new Font("Arial", 10, PdfFontStyle.Underline); // FontStyle _c1pdf.AddLink("http://www.grapecity.com", rc); _c1pdf.DrawString("Visit GrapeCity", font, Color.Blue, rc); // Brushes.Blue