PageVisibleArea

Provides the details of visible area of a page.

public class PageVisibleArea

Inheritance: ObjectPageVisibleArea

Licensing Info

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

Examples

The following example will show how we can get the array of PageVisibleArea for a view.

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

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

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

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

        [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");
            pdfViewer.Open(document);

            // Get a view to calculate visible page area
            ceTe.DynamicPDF.Viewer.View currentView = pdfViewer.GetCurrentView();

            // Get the array of pages with their visible area
            PageVisibleArea[] visibleAreaArray = pdfViewer.GetPageVisibleArea(currentView);

            // Get the details of visible page area
            int pageNumber = visibleAreaArray[0].PageNumber;
            float left = visibleAreaArray[0].Left;
            float top = visibleAreaArray[0].Top;
            float right = visibleAreaArray[0].Right;
            float bottom = visibleAreaArray[0].Bottom;
        }
    }
}

Properties

BottomGets the bottom value of the page.
LeftGets the left value of the page.
PageNumberGets the page number.
PixelBottomGets the bottom display end position of the page in pixels.
PixelLeftGets the left display start position of the page in pixels.
PixelRightGets the right display end position of the page in pixels.
PixelTopGets the top display start position of the page in pixels.
RightGets the right value of the page.
TopGets the top value of the page.

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.Viewer