PdfViewer.Open

Overloads

Open(PdfDocument)Opens a new PDF using PdfDocument .
Open(String)Opens a PDF document.

Open(PdfDocument)

Opens a new PDF using PdfDocument .

public void Open(PdfDocument document)
Sub Open(document As PdfDocument)

Parameters

document
PdfDocument

Licensing Info

This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

Examples

This example shows, how to load a PDF document in PdfViewer using PdfDocument .

Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer

Public Class Form1
    Inherits System.Windows.Forms.Form

    Private MyPdfViewer As PdfViewer

    Sub New()
        InitializeComponent()
    End Sub

    Private Sub InitializeComponent()
        Me.MyPdfViewer = New PdfViewer()
        Me.Controls.Add(MyPdfViewer)
    End Sub

    Shared Sub Main()
        Application.Run(New Form1())
    End Sub			
    
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        ' Load and open the document in Viewer.
        Dim MyDocument As New PdfDocument("C:\MyDocument.pdf")
        MyPdfViewer.Open(MyDocument)
    End Sub

End Class						
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;

namespace DynamicPDFViewerDemo
{
    public class Form1 : Form
    {
        private ceTe.DynamicPDF.Viewer.PdfViewer dpdfViewer;

        public Form1()
        {
            InitializeComponent();
            this.Load += new EventHandler(Form1_Load);
        }

        private void InitializeComponent()
        {
            this.dpdfViewer = new PdfViewer();
            this.Controls.Add(dpdfViewer);
        }

        [STAThread]
        static void Main()
        {
            Application.Run(new Form1());
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // Load and open the document in Viewer.
            PdfDocument document = new PdfDocument(@"C:\MyDocument.pdf");
            Open(document);
        }
    }
}

Open(String)

Opens a PDF document.

public void Open(string filePath)
Sub Open(filePath As String)

Parameters

filePath
String

Licensing Info

This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

Examples

This example shows, how to load a PDF document in PdfViewer .

Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer

Public Class Form1
    Inherits System.Windows.Forms.Form

    Private MyPdfViewer As PdfViewer

    Sub New()
        InitializeComponent()
    End Sub

    Private Sub InitializeComponent()
        Me.MyPdfViewer = New PdfViewer()
        Me.Controls.Add(MyPdfViewer)
    End Sub

    Shared Sub Main()
        Application.Run(New Form1())
    End Sub			
    
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        ' open the document using the file path.
        MyPdfViewer.Open("C:\MyDocument.pdf")
    End Sub

End Class						
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;

namespace DynamicPDFViewerDemo
{
    public class Form1 : Form
    {
        private ceTe.DynamicPDF.Viewer.PdfViewer dpdfViewer;

        public Form1()
        {
            InitializeComponent();
            this.Load += new EventHandler(Form1_Load);
        }

        private void InitializeComponent()
        {
            this.dpdfViewer = new PdfViewer();
            this.Controls.Add(dpdfViewer);
        }

        [STAThread]
        static void Main()
        {
            Application.Run(new Form1());
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // open the document using the file path.
            Open(@"C:\MyDocument.pdf");
        }
    }
}

See Also

PdfViewer
ceTe.DynamicPDF.Viewer

In this topic