Platforms to show: All Mac Windows Linux Cross-Platform

PDFSelectionMBS.addSelection(selection as PDFSelectionMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Add a selection to this selection.
Notes: Selections do not have to be contiguous. If the selection added overlaps with this selection, overlaps are removed.

Feedback, Comments & Corrections

PDFSelectionMBS.addSelections(selection() as PDFSelectionMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Adds the specified array of selections to the receiving selection.
Notes:
This method provides better performance than multiple calls to addSelection if you need to add several selections to an existing selection. This is because the normalization of the selection (the removal of any overlaps between selections) occurs only once, after all selections have been added.
Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

PDFSelectionMBS.boundsForPage(page as PDFPageMBS) as NSRectMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Returns the bounds of the selection on the specified page.
Notes:
The selection rectangle is given in page space.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.

Some examples using this method:

Feedback, Comments & Corrections

PDFSelectionMBS.Constructor(doc as PDFDocumentMBS)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Creates an empty PDFSelection object.
Notes:
Typically, you don't need to create a PDFSelection object, but you can use an empty PDFSelection object as a container into which you can place selections, using addSelection: and addSelections.
Available in Mac OS X v10.5 and later.

See also:

Feedback, Comments & Corrections

PDFSelectionMBS.Constructor(Handle as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 20.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Creates a new object based on a given PDFSelection handle.
Notes:
Please pass in a non zero handle which points to a PDFSelection object.
For use with declares.

See also:

Feedback, Comments & Corrections

PDFSelectionMBS.copy as PDFSelectionMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Creates a copy of the selection object.

Feedback, Comments & Corrections

PDFSelectionMBS.drawForPage(page as PDFPageMBS, active as boolean)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Calls drawForPage with a default value for box parameter.
Notes: The default value is kPDFDisplayBoxCropBox. If active is true, drawing uses selectedTextBackgroundColor. If false, it uses secondarySelectedControlColor.

See also:

Feedback, Comments & Corrections

PDFSelectionMBS.drawForPage(page as PDFPageMBS, box as Integer, active as boolean)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Draws the selection relative to the origin of the specified box in page space.
Notes:
The selection is drawn using the current highlight color. If active is true, drawing uses selectedTextBackgroundColor. If false, it uses secondarySelectedControlColor. Refer to the PDFPage class for the list of available box types.

Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.

See also:

Feedback, Comments & Corrections

PDFSelectionMBS.extendSelectionAtEnd(chars as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Extends the selection at either end.
Example:
dim s as PDFSelectionMBS // your selection

s.extendSelectionAtEnd(50)
Notes: Selections can be extended right off onto neighboring pages even to include the entire PDF document.

Some examples using this method:

Feedback, Comments & Corrections

PDFSelectionMBS.extendSelectionAtStart(chars as Integer)
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Extends the selection at either end.
Example:
dim s as PDFSelectionMBS // your selection

s.extendSelectionAtStart(50)
Notes: Selections can be extended right off onto neighboring pages even to include the entire PDF document.

Some examples using this method:

Feedback, Comments & Corrections

PDFSelectionMBS.extendSelectionForLineBoundaries
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 21.1 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Extend to the selection to the beginning and end of the currently selected lines of text.
Notes:
If the current selection is on a single line, then this will extend it to the entire line width. If the selection is across multiple lines, then the first and last lines are expected to wholly contain their respective rows of text.

Available in macOS 10.13 or newer or iOS 11.0 or newer.

Feedback, Comments & Corrections

PDFSelectionMBS.numberOfTextRangesOnPage(page as PDFPageMBS) as UInt32
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Returns the number of contiguous ranges of text on the specified page.
Notes:
Returns zero if page is not in selection.
A typical, simple selection will contain a single range of text.

Available in Mac OS X 10.7 and later.

Feedback, Comments & Corrections

PDFSelectionMBS.pages as PDFPageMBS()
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Array of pages covered by the selection.
Notes:
These are sorted by page index.
Returns nil on any error.

Feedback, Comments & Corrections

PDFSelectionMBS.rangeAtIndex(page as PDFPageMBS, index as Integer) as NSRangeMBS
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Returns a range of contiguous text at index on the specified page.
Notes:
A simple selection. A typical, simple selection will contain a single range of text.
Available in Mac OS X 10.7 and later.

Feedback, Comments & Corrections

PDFSelectionMBS.selectionsByLine as PDFSelectionMBS()
Type Topic Plugin Version macOS Windows Linux iOS Targets
method PDFKit MBS MacControls Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Returns an array of selections, one for each line of text covered by the receiver.
Notes:
If you call this method on a PDFSelection object that represents a paragraph, for example, selectionsByLine returns an array that contains one PDFSelection object for each line of text in the paragraph.
Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacControls Plugin.

The biggest plugin in space...




Links
MBS Xojo Chart Plugins

Start Chat