PdfiumViewer
Classes | Public Member Functions | Protected Member Functions | Properties | Events | List of all members
PdfiumViewer.PdfRenderer Class Reference

Control to render PDF documents. More...

Inheritance diagram for PdfiumViewer.PdfRenderer:
PdfiumViewer.PanningZoomingScrollControl PdfiumViewer.CustomScrollControl

Public Member Functions

Rectangle GetOuterBounds (int page)
 Get the outer bounds of the page. More...
 
 PdfRenderer ()
 Initializes a new instance of the PdfRenderer class. More...
 
PdfPoint PointToPdf (Point location)
 Converts client coordinates to PDF coordinates. More...
 
Point PointFromPdf (PdfPoint point)
 Converts a PDF point to a client point. More...
 
PdfRectangle BoundsToPdf (Rectangle bounds)
 Converts client coordinates to PDF bounds. More...
 
Rectangle BoundsFromPdf (PdfRectangle bounds)
 Converts PDF bounds to client bounds. More...
 
void Load (IPdfDocument document)
 Load a IPdfDocument into the control. More...
 
void RotateLeft ()
 Rotate the PDF document left. More...
 
void RotateRight ()
 Rotate the PDF document right. More...
 
void ScrollIntoView (PdfRectangle bounds)
 Scroll the PDF bounds into view. More...
 
void ScrollIntoView (Rectangle rectangle)
 Scroll the client rectangle into view. More...
 
- Public Member Functions inherited from PdfiumViewer.PanningZoomingScrollControl
void ZoomIn ()
 Zooms the PDF document in one step. More...
 
void ZoomOut ()
 Zooms the PDF document out one step. More...
 
- Public Member Functions inherited from PdfiumViewer.CustomScrollControl
void SetDisplayRectLocation (Point offset)
 
void SetDisplayRectLocation (Point offset, bool preserveContents)
 
void PerformScroll (ScrollAction action, Orientation scrollBar)
 

Protected Member Functions

override void OnLayout (LayoutEventArgs levent)
 Raises the E:System.Windows.Forms.Control.Layout event. More...
 
override void OnZoomChanged (EventArgs e)
 Called when the zoom level changes. More...
 
override void OnPaint (PaintEventArgs e)
 Raises the E:System.Windows.Forms.Control.Paint event. More...
 
override Rectangle GetDocumentBounds ()
 Gets the document bounds. More...
 
override void OnSetCursor (SetCursorEventArgs e)
 Called whent he cursor changes. More...
 
override void OnMouseDown (MouseEventArgs e)
 Raises the E:System.Windows.Forms.Control.MouseDown event. More...
 
override void OnMouseUp (MouseEventArgs e)
 Raises the E:System.Windows.Forms.Control.MouseUp event. More...
 
virtual void OnLinkClick (LinkClickEventArgs e)
 Called when a link is clicked. More...
 
override void SetZoom (double zoom, Point? focus)
 Called when the zoom level changes. More...
 
override void Dispose (bool disposing)
 Releases the unmanaged resources used by the T:System.Windows.Forms.Control and its child controls and optionally releases the managed resources. More...
 
- Protected Member Functions inherited from PdfiumViewer.PanningZoomingScrollControl
override void OnMouseWheel (MouseEventArgs e)
 Raises the E:System.Windows.Forms.Control.MouseWheel event. More...
 
override bool IsInputKey (Keys keyData)
 Determines whether the specified key is a regular input key or a special key that requires preprocessing. More...
 
override void OnLayout (LayoutEventArgs levent)
 
override void OnMouseDown (MouseEventArgs e)
 
override void OnMouseMove (MouseEventArgs e)
 
override void OnMouseUp (MouseEventArgs e)
 
- Protected Member Functions inherited from PdfiumViewer.CustomScrollControl
virtual void OnScroll (ScrollEventArgs se)
 
virtual void OnDisplayRectangleChanged (EventArgs e)
 
void SetDisplaySize (Size size)
 
override void OnLayout (LayoutEventArgs levent)
 
override void OnMouseWheel (MouseEventArgs e)
 
override void OnVisibleChanged (EventArgs e)
 
override void WndProc (ref System.Windows.Forms.Message m)
 
override bool IsInputKey (Keys keyData)
 Determines whether the specified key is a regular input key or a special key that requires preprocessing. More...
 

Properties

IPdfDocument Document [get]
 The associated PDF document. More...
 
new bool TabStop [get, set]
 Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. More...
 
int Page [get, set]
 Gets or sets the currently focused page. More...
 
PdfViewerZoomMode ZoomMode [get, set]
 Gets or sets the way the document should be zoomed initially. More...
 
PdfRotation Rotation [get, set]
 Gets or sets the current rotation of the PDF document. More...
 
PdfMarkerCollection Markers [get]
 Gets a collection with all markers. More...
 
- Properties inherited from PdfiumViewer.PanningZoomingScrollControl
double Zoom [get, set]
 Gets or sets the current zoom level. More...
 
double ZoomFactor [get, set]
 
double ZoomMin [get, set]
 
double ZoomMax [get, set]
 
MouseWheelMode MouseWheelMode [get, set]
 
- Properties inherited from PdfiumViewer.CustomScrollControl
override CreateParams CreateParams [get]
 
override Rectangle DisplayRectangle [get]
 
bool HScroll [get]
 
bool VScroll [get]
 

Events

LinkClickEventHandler LinkClick
 Occurs when a link in the pdf document is clicked. More...
 
- Events inherited from PdfiumViewer.PanningZoomingScrollControl
EventHandler ZoomChanged
 
- Events inherited from PdfiumViewer.CustomScrollControl
ScrollEventHandler Scroll
 
EventHandler DisplayRectangleChanged
 
SetCursorEventHandler SetCursor
 

Additional Inherited Members

- Static Public Attributes inherited from PdfiumViewer.PanningZoomingScrollControl
const double DefaultZoomMin = 0.1
 
const double DefaultZoomMax = 5
 
const double DefaultZoomFactor = 1.2
 

Detailed Description

Control to render PDF documents.

Constructor & Destructor Documentation

◆ PdfRenderer()

PdfiumViewer.PdfRenderer.PdfRenderer ( )

Initializes a new instance of the PdfRenderer class.

Member Function Documentation

◆ BoundsFromPdf()

Rectangle PdfiumViewer.PdfRenderer.BoundsFromPdf ( PdfRectangle  bounds)

Converts PDF bounds to client bounds.

Parameters
boundsThe PDF bounds to convert.
Returns
The bounds of the PDF bounds in client coordinates.

◆ BoundsToPdf()

PdfRectangle PdfiumViewer.PdfRenderer.BoundsToPdf ( Rectangle  bounds)

Converts client coordinates to PDF bounds.

Parameters
boundsThe client coordinates to convert.
Returns
The PDF bounds.

◆ Dispose()

override void PdfiumViewer.PdfRenderer.Dispose ( bool  disposing)
protected

Releases the unmanaged resources used by the T:System.Windows.Forms.Control and its child controls and optionally releases the managed resources.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

◆ GetDocumentBounds()

override Rectangle PdfiumViewer.PdfRenderer.GetDocumentBounds ( )
protectedvirtual

Gets the document bounds.

Returns
The document bounds.

Implements PdfiumViewer.PanningZoomingScrollControl.

◆ GetOuterBounds()

Rectangle PdfiumViewer.PdfRenderer.GetOuterBounds ( int  page)

Get the outer bounds of the page.

Parameters
pageThe page to get the bounds for.
Returns
The bounds of the page.

◆ Load()

void PdfiumViewer.PdfRenderer.Load ( IPdfDocument  document)

Load a IPdfDocument into the control.

Parameters
documentDocument to load.

◆ OnLayout()

override void PdfiumViewer.PdfRenderer.OnLayout ( LayoutEventArgs  levent)
protected

Raises the E:System.Windows.Forms.Control.Layout event.

Parameters
leventA T:System.Windows.Forms.LayoutEventArgs that contains the event data.

◆ OnLinkClick()

virtual void PdfiumViewer.PdfRenderer.OnLinkClick ( LinkClickEventArgs  e)
protectedvirtual

Called when a link is clicked.

Parameters
eThe event args.

◆ OnMouseDown()

override void PdfiumViewer.PdfRenderer.OnMouseDown ( MouseEventArgs  e)
protected

Raises the E:System.Windows.Forms.Control.MouseDown event.

Parameters
eA T:System.Windows.Forms.MouseEventArgs that contains the event data.

◆ OnMouseUp()

override void PdfiumViewer.PdfRenderer.OnMouseUp ( MouseEventArgs  e)
protected

Raises the E:System.Windows.Forms.Control.MouseUp event.

Parameters
eA T:System.Windows.Forms.MouseEventArgs that contains the event data.

◆ OnPaint()

override void PdfiumViewer.PdfRenderer.OnPaint ( PaintEventArgs  e)
protected

Raises the E:System.Windows.Forms.Control.Paint event.

Parameters
eA T:System.Windows.Forms.PaintEventArgs that contains the event data.

◆ OnSetCursor()

override void PdfiumViewer.PdfRenderer.OnSetCursor ( SetCursorEventArgs  e)
protectedvirtual

Called whent he cursor changes.

Parameters
eThe event args.

Reimplemented from PdfiumViewer.PanningZoomingScrollControl.

◆ OnZoomChanged()

override void PdfiumViewer.PdfRenderer.OnZoomChanged ( EventArgs  e)
protectedvirtual

Called when the zoom level changes.

Parameters
eThe event args.

Reimplemented from PdfiumViewer.PanningZoomingScrollControl.

◆ PointFromPdf()

Point PdfiumViewer.PdfRenderer.PointFromPdf ( PdfPoint  point)

Converts a PDF point to a client point.

Parameters
pointThe PDF point to convert.
Returns
The location of the point in client coordinates.

◆ PointToPdf()

PdfPoint PdfiumViewer.PdfRenderer.PointToPdf ( Point  location)

Converts client coordinates to PDF coordinates.

Parameters
locationClient coordinates to get the PDF location for.
Returns
The location in a PDF page or a PdfPoint with IsValid false when the coordinates do not match a PDF page.

◆ RotateLeft()

void PdfiumViewer.PdfRenderer.RotateLeft ( )

Rotate the PDF document left.

◆ RotateRight()

void PdfiumViewer.PdfRenderer.RotateRight ( )

Rotate the PDF document right.

◆ ScrollIntoView() [1/2]

void PdfiumViewer.PdfRenderer.ScrollIntoView ( PdfRectangle  bounds)

Scroll the PDF bounds into view.

Parameters
boundsThe PDF bounds to scroll into view.

◆ ScrollIntoView() [2/2]

void PdfiumViewer.PdfRenderer.ScrollIntoView ( Rectangle  rectangle)

Scroll the client rectangle into view.

Parameters
rectangleThe client rectangle to scroll into view.

◆ SetZoom()

override void PdfiumViewer.PdfRenderer.SetZoom ( double  zoom,
Point?  focus 
)
protectedvirtual

Called when the zoom level changes.

Parameters
zoomThe new zoom level.
focusThe location to focus on.

Reimplemented from PdfiumViewer.PanningZoomingScrollControl.

Property Documentation

◆ Document

IPdfDocument PdfiumViewer.PdfRenderer.Document
get

The associated PDF document.

◆ Markers

PdfMarkerCollection PdfiumViewer.PdfRenderer.Markers
get

Gets a collection with all markers.

◆ Page

int PdfiumViewer.PdfRenderer.Page
getset

Gets or sets the currently focused page.

◆ Rotation

PdfRotation PdfiumViewer.PdfRenderer.Rotation
getset

Gets or sets the current rotation of the PDF document.

◆ TabStop

new bool PdfiumViewer.PdfRenderer.TabStop
getset

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.

Returns
true if the user can give the focus to the control using the TAB key; otherwise, false. The default is true.Note:This property will always return true for an instance of the T:System.Windows.Forms.Form class.

<filterpriority>1</filterpriority><PermissionSet><IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"><IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"><IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence"><IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"></PermissionSet>

◆ ZoomMode

PdfViewerZoomMode PdfiumViewer.PdfRenderer.ZoomMode
getset

Gets or sets the way the document should be zoomed initially.

Event Documentation

◆ LinkClick

LinkClickEventHandler PdfiumViewer.PdfRenderer.LinkClick

Occurs when a link in the pdf document is clicked.


The documentation for this class was generated from the following file: