Show / Hide Table of Contents

Class PDFViewCtrl.Selection

Selection is a utility class that allows access to PDFViewCtrl's current selection.

Inheritance
System.Object
PDFViewCtrl.Selection
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public class Selection : IDisposable

Methods

Dispose()

Releases all resources used by the Selection

Declaration
public override sealed void Dispose()

Dispose(Boolean)

Declaration
[HandleProcessCorruptedStateExceptions]
protected virtual void Dispose(bool A_0)
Parameters
Type Name Description
System.Boolean A_0

Finalize()

Declaration
protected void Finalize()

GetAsHtml()

Gets the current text selection in HTML format. HTML text will contain styling information such as text color, font size, style etc.

Declaration
public string GetAsHtml()
Returns
Type Description
System.String

the current text selection in HTML format.

Remarks

this function can be used to implement clipboard copy and paste that preserves text formating.

GetAsUnicode()

Gets the current text selection represented as an Unicode string.

Declaration
public string GetAsUnicode()
Returns
Type Description
System.String

the current text selection represented as an Unicode string.

GetPageNum()

Gets the page number containing the selected text.

Declaration
public int GetPageNum()
Returns
Type Description
System.Int32

the page number containing the selected text.

GetQuads()

Gets the list of tight bounding quads in the current text selection.

Declaration
public double[] GetQuads()
Returns
Type Description
System.Double[]

an array of vertices representing a list of bounding quads for the selected text. Each bounding quad is represented using 8 numbers in an array of doubles. Each two consecutive values represent the x and y coordinates of a quad vertex and the four vertices are arranged counter-clockwisely. Note that the first vertex is not guaranteed to be the lower-left vertex.

Remarks

the 'quads' array is owned by the current selection and does not need to be explicitly released.

Implements

System.IDisposable
Back to top Generated by DocFX