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:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Viewer selected.
- A DynamicPDF Viewer for .NET v3.X Developer license.
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
Bottom | Gets the bottom value of the page. |
Left | Gets the left value of the page. |
PageNumber | Gets the page number. |
PixelBottom | Gets the bottom display end position of the page in pixels. |
PixelLeft | Gets the left display start position of the page in pixels. |
PixelRight | Gets the right display end position of the page in pixels. |
PixelTop | Gets the top display start position of the page in pixels. |
Right | Gets the right value of the page. |
Top | Gets 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) |