Viscomsoft .NET PDF Viewer SDK
|
PDFView Object
|
Description
PDFView represents the PDF View. You must create the instance of PDFView first , when you want to Load and view PDF files.
Namespace: Viscomsoft.PDFViewer
Example
|
[C# Syntax] using Viscomsoft.PDFViewer;
public partial class Form1 : Form {
public PDFView _pdfViewer; _pdfViewer = new PDFView(); _pdfViewer.Canvas.Parent = this; _pdfViewer.Canvas.Location = new Point(0, 24);
private void Form1_Load(object sender, EventArgs e) { resizeCanvas();
PDFDocument doc = new PDFDocument(); if (doc.open("c:\\yourfile.pdf")) { _pdfViewer.Document = doc; _pdfViewer.gotoPage(1); _pdfViewer.zoomIn(); } }
private void resizeCanvas() { _pdfViewer.Canvas.Size = new Size(this.ClientSize.Width, this.ClientSize.Height - 24); } }
|
|
[Visual Basic Syntax] Imports Viscomsoft.PDFViewer
Public Class Form1 {
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
_pdfviewer.Canvas.Parent = Me
_pdfviewer.Canvas.Location = New Point(0, 24)
resizeCanvas()
Dim doc As New PDFDocument
If doc.open("c:\temp\yourfile.pdf") Then
_pdfviewer.Document = doc
_pdfviewer.gotoPage(1) _pdfViewer.zoomIn() End If
End Sub
Private Sub resizeCanvas()
_pdfviewer.Canvas.Size = New Size(Me.ClientSize.Width, Me.ClientSize.Height - 24)
End Sub
}
|
|
|