Represents a link with a destination or action.
For a list of all members of this type, see Link members.
![]() ![]()
|
ceTe.DynamicPDF.PageElement
ceTe.DynamicPDF.PageElements.Link
[Visual Basic]
Public Class Link
Inherits PageElement
Implements IAnnotation, IArea, ICoordinate [C#]
public class Link : PageElement, IAnnotation, IArea, ICoordinate This class can be used to place links on the PDF.
The following example will place a label on the PDF then create a link at that location that links to a webpage.
[Visual Basic]
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a Page and add it to the document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
Dim MyText As String = "This is a link to DynamicPDF.com"
Dim MyFont As Font = Font.Helvetica
' Create the link's label
Dim MyLabel As Label = New Label(MyText, 50, 50, 400, 20, MyFont, 18, _
RgbColor.Blue)
MyLabel.Underline = True
' Set the action then create the link
Dim action As UrlAction = New UrlAction("http://www.dynamicpdf.com")
Dim MyLink As Link = New Link(50, 50, MyFont.GetTextWidth(MyText, 18), _
20, Action)
' Add the label and the link to the page
MyPage.Elements.Add(MyLabel)
MyPage.Elements.Add(MyLink)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
[C#]
using System; |
This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:
Namespace: ceTe.DynamicPDF.PageElements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)
Link Members | ceTe.DynamicPDF.PageElements Namespace
© Copyright 2006, ceTe Software