PageReaderEvents

Represents page reader events.

public class PageReaderEvents
Public Class PageReaderEvents

Inheritance: ObjectPageReaderEvents

Licensing Info

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

The following example shows how to use page reader events.
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
     
Module MyModule
     
    Sub Main()	
     	
        ' Create a PDF Document
        Dim MyDocument As Document = New Document()
     
        ' Create a pages and add it to the document
        Dim MyPage As Page = New Page()
        Dim MyPage1 As Page = New Page()	
        MyDocument.Pages.Add(MyPage)
        MyDocument.Pages.Add(MyPage1)
     
        ' Create labels and add it to the page
        Dim MyLabel1 As Label  = New Label("Page Additional Actions", 50, 50, 400, 50, Font.Courier, 20)
        Dim MyLabel2 As Label  = New Label("Go to the second page to see the page open action", 50, 150, 300, 50, Font.Courier, 15)
        Dim MyLabel3 As Label  = New Label("Second page", 50, 100, 300, 50, Font.Courier, 15)
        MyPage.Elements.Add(MyLabel1)
        MyPage.Elements.Add(MyLabel2)
        MyPage.Elements.Add(MyLabel3)
     
        ' Create a java script action and assign to the page reader event.
        Dim MyAction As JavaScriptAction = New JavaScriptAction("app.alert(\"Welcome to the second page!!\")")
        MyPage1.ReaderEvents.Open = MyAction
     
        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")
     
End Sub
End Module
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example 
{
    public static void CreatePDF(string outputPath)
    {
        // Create a PDF Document
        Document document = new Document();

        // Create pages and add it to the document
        Page page = new Page();
        Page page1 = new Page();
        document.Pages.Add(page);
        document.Pages.Add(page1);

        // Create labels and add it to the page
        Label label1 = new Label("Page Additional Actions", 50, 50, 400, 50, Font.Courier, 20);
        Label label2 = new Label("Go to the second page to see the page open action", 50, 150, 300, 50, Font.Courier, 15);
        Label label3 = new Label("Second page", 50, 100, 300, 50, Font.Courier, 15);
        page.Elements.Add(label1);
        page.Elements.Add(label2);
        page1.Elements.Add(label3);

        // Create a java script action and assign to the page reader event.
        JavaScriptAction action = new JavaScriptAction("app.alert(\"Welcome to the second page!!\")");
        page1.ReaderEvents.Open = action;

        // Save the PDF
        document.Draw(outputPath);
    }
}

Constructors

PageReaderEvents()Initializes a new instance of the PageReaderEvents class.

Properties

CloseGets or sets page close event actions.
OpenGets or sets page open event actions.

Methods

Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF

In this topic