See Also

UrlAction Members  | ceTe.DynamicPDF Namespace

Requirements

Namespace: ceTe.DynamicPDF

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)

Language

Visual Basic

C#

Show All

Represents an action linking to an external URL.

For a list of all members of this type, see UrlAction members.

Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.Action
      ceTe.DynamicPDF.UrlAction

Syntax

[Visual Basic]
Public Class UrlAction    Inherits Action
[C#]
public class UrlAction : Action

Remarks

This class can be used to specify a URL when defining a Link or a Bookmark.

Example

This example shows how to create an outline for a PDF document using UrlAction.

[Visual Basic] 

Imports System
Imports ceTe.DynamicPDF

Module MyModule

    Sub Main()

        ' Create a PDF Document
        Dim MyDocument As Document = New Document

        ' Add three blank pages
        MyDocument.Pages.Add(New Page(PageSize.Letter))
        MyDocument.Pages.Add(New Page(PageSize.Letter))
        MyDocument.Pages.Add(New Page(PageSize.Letter))

        ' Add a top level outline and set properties
        Dim MyOutline1 As Outline = MyDocument.Outlines.Add("Outline1")
        MyOutline1.Style = TextStyle.Bold
        MyOutline1.Color = New RgbColor(255, 0, 0)

        ' Add child outlines
        Dim MyOutline1A As Outline = MyOutline1.Outlines.Add("Outline1A", New UrlAction("http://www.dynamicpdf.com"))
        MyOutline1A.Expanded = False
        Dim MyOutline1A1 As Outline = MyOutline1A.Outlines.Add("Outline1A1", New XYDestination(2, 0, 0))
        Dim MyOutline1A2 As Outline = MyOutline1A.Outlines.Add("Outline1A2", New ZoomDestination(2, PageZoom.FitHeight))
        Dim MyOutline1B As Outline = MyOutline1.Outlines.Add("Outline1B", New ZoomDestination(2, PageZoom.FitWidth))

        ' Add a second top level outline
        Dim MyOutline2 As Outline = MyDocument.Outlines.Add("Outline2", New XYDestination(3, 0, 300))

        ' Add a child outline
        Dim MyOutline2A As Outline = MyOutline2.Outlines.Add("Outline2A")

        ' Save the PDF document
        MyDocument.Draw("C:\MyDocument.pdf")

    End Sub
End Module

[C#] 

using System; 
using ceTe.DynamicPDF; 
 
class MyClass 

    static void Main() 
    { 
        // Create a PDF Document 
        Document document = new Document(); 
         
        // Add three blank pages 
        document.Pages.Add( new Page( PageSize.Letter ) ); 
        document.Pages.Add( new Page( PageSize.Letter ) ); 
        document.Pages.Add( new Page( PageSize.Letter ) ); 
         
        // Add a top level outline and set properties 
        Outline outline1 = document.Outlines.Add( "Outline1" ); 
        outline1.Style = TextStyle.Bold; 
        outline1.Color = new RgbColor( 255, 0, 0 ); 
         
        // Add child outlines 
        Outline outline1A = outline1.Outlines.Add( "Outline1A", new UrlAction( "http://www.dynamicpdf.com" ) ); 
        outline1A.Expanded = false; 
        Outline outline1A1 = outline1A.Outlines.Add( "Outline1A1", new XYDestination( 2, 0, 0 ) ); 
        Outline outline1A2 = outline1A.Outlines.Add( "Outline1A2", new ZoomDestination( 2, PageZoom.FitHeight ) ); 
        Outline outline1B = outline1.Outlines.Add( "Outline1B", new ZoomDestination( 2, PageZoom.FitWidth ) ); 
         
        // Add a second top level outline 
        Outline outline2 = document.Outlines.Add( "Outline2", new XYDestination( 3, 0, 300 ) ); 
         
        // Add a child outline 
        Outline outline2A = outline2.Outlines.Add( "Outline2A" ); 
         
        // Save the PDF document 
        document.Draw( @"C:\MyDocument.pdf" ); 
    } 
}

Licensing

This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:

Requirements

Namespace: ceTe.DynamicPDF

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)

See Also

UrlAction Members  | ceTe.DynamicPDF Namespace

 

 


© Copyright 2006, ceTe Software