Platforms to show: All Mac Windows Linux Cross-Platform
Back to PDFViewMBS class.
PDFViewMBS.annotationsChangedOnPage(page as PDFPageMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
When the PDFView object receives this message, it rescans for tool tips and pop-ups and informs the PDFThumbailView objects so the thumbnail images can be redrawn.
Available in Mac OS X v10.5 and later.
PDFViewMBS.areaOfInterestForMouse(e as NSEventMBS) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The PDFAreaOfInterest enumeration defines the various area types. This method is for custom subclasses of the PDFView class. Use it if you override the NSResponder class's mouseMoved: method or related methods.
PDFViewMBS.areaOfInterestForPoint(p as NSPointMBS) as integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 21.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The view redraws as necessary but does not scroll. This call is equivalent to setting CurrentSelection=nil.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
On success the handle property is not zero.
See also:
PDFViewMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The handle is casted to a NSButton and the plugin retains this handle.
See also:
PDFViewMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
On success the handle property is not zero.
See also:
PDFViewMBS.convertPointFromPage(point as NSPointMBS, page as PDFPageMBS) as NSPointMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.
PDFViewMBS.convertPointToPage(point as NSPointMBS, page as PDFPageMBS) as NSPointMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.
PDFViewMBS.convertRectFromPage(rect as NSRectMBS, page as PDFPageMBS) as NSRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.
Some examples using this method:
PDFViewMBS.convertRectToPage(rect as NSRectMBS, page as PDFPageMBS) as NSRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDFViewMBS.drawPage(page as PDFPageMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Do not invoke this method, except by invoking it on super from a subclass.
The PDFView class calls drawPage: as necessary for each visible page that requires rendering. In the PDFView class, this method erases page to white, calls page.drawInRect(pageRect,self.displayBox), and then draws the selection, if any.
You can override this method to draw on top of a PDF page or to control how pages are drawn. In these cases, invoke this method on super and then perform custom drawing on top of the PDF page.
Changed in v22.5 to work on macOS Ventura.
But if the drawPage is called by macOS on the wrong thread, we ignore that to prevent StackOverflowException from Xojo runtime.
PDFViewMBS.drawPagePost(page as PDFPageMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The default implementation of this method draws the text highlighting (if any) for the page. This method does not apply scaling or rotating to the current context to map to page space; instead, the context is in view-space coordinates (in which the origin is at the lower-left corner of the current PDF view).
Available in Mac OS X v10.5 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The page history gets built as your application calls navigation methods such as goToDestination and goToLastPage.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The page history gets built as your application calls navigation methods such as goToDestination and goToLastPage.
PDFViewMBS.goToDestination(page as PDFDestinationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Destinations include a page and a point on the page specified in page space.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDF Kit records the move in its page history.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDF Kit records the move in its page history.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDF Kit records the move in its page history.
PDFViewMBS.goToPage(page as PDFPageMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDF Kit records the move in its page history.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDF Kit records the move in its page history.
PDFViewMBS.goToRect(rect as NSRectMBS, page as PDFPageMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
If the specified rectangle is already visible, this method does nothing. This allows you to scroll the PDFView object to a specific PDFAnnotation or PDFSelection object, because both of these objects have bounds methods that return an annotation or selection position in page space.
Note that rect is specified in page-space coordinates. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
Available in Mac OS X v10.5 and later.
PDFViewMBS.goToSelection(page as PDFSelectionMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDF Kit records the move in its page history.
PDFViewMBS.highlightedSelections as PDFSelectionMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 21.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Unlike the user selection (above), these selections do not go away when the user clicks in the PDFView, etc. You must explicitly remove them by passing nil to setHighlightedSelections. These methods allow you to highlight text perhaps to indicate matches from a text search. To avoid confusion you should probably make sure the PDFSelectionMBS passed in are a different color from the user's default text selection color. Commonly used for highlighting search results.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The PDFView actually contains several subviews, such as the document view (where the PDF is actually drawn) and a "matte view" (which may appear as a gray area around the PDF content, depending on the scaling). Changes to the PDF content may require changes to these inner views, so you must call this method explicitly if you use PDF Kit utility classes to add or remove a page, rotate a page, or perform other operations affecting visible layout.
This method is called automatically from PDFView methods that affect the visible layout (such as setDocument, setDisplayBox or zoomIn).
PDFViewMBS.pageForPoint(point as NSPointMBS, nearest as boolean) as PDFPageMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Returns nil if there's no page at the specified point and nearest is set to false.
PDFViewMBS.performAction(action as PDFActionMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Available in Mac OS X v10.5 and later.
PDFViewMBS.printWithInfo(printInfo as NSRectMBS, autoRotate as Boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 21.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If autoRotate is true, will ignore the orientation attribute in printInfo and rather choose the orientation on a page by page basis that best fits the page to the paper size.
See also:
PDFViewMBS.printWithInfo(printInfo as NSRectMBS, autoRotate as Boolean, pageScaling as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 21.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If pageScaling is equal to kPDFPrintPageScaleToFit each page is scaled up or down in order to best fit the paper size. Specifying kPDFPrintPageScaleDownToFit for pageScaling will only scale large pages down to fit the paper, smaller pages will not be scaled up. Passing pageScaling equal to kPDFPrintPageScaleNone is the equivalent of calling printWithInfo above.
See also:
PDFViewMBS.rowSizeForPage(page as PDFPageMBS) as NSSizeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The size is dependent on the current scale factor and display attributes.
PDFViewMBS.scrollSelectionToVisible
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDFViewMBS.setCurrentSelection(selection as PDFSelectionMBS, animate as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
This method behaves as setCurrentSelection, but with the addition of animation, if animate is true. The animation serves to draw the user's attention to the new selection, which can be useful when implementing search.
Available in Mac OS X v10.5 and later.
PDFViewMBS.setCursorForAreaOfInterest(area as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This method is especially useful for custom subclasses of the PDFView class.
PDFViewMBS.setHighlightedSelections(selections() as PDFSelectionMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 21.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Unlike the user selection (above), these selections do not go away when the user clicks in the PDFView, etc. You must explicitly remove them by passing nil to setHighlightedSelections. These methods allow you to highlight text perhaps to indicate matches from a text search. To avoid confusion you should probably make sure the PDFSelectionMBS passed in are a different color from the user's default text selection color. Commonly used for highlighting search results.
PDFViewMBS.visiblePages as PDFPageMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Available in Mac OS X v10.5 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Each invocation of zoomIn muliplies the scaling factor by the square root of 2.
Available in Mac OS X v10.4 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Each invocation of zoomOut divides the scaling factor by the square root of 2.
Available in Mac OS X v10.4 and later.
The items on this page are in the following plugins: MBS PDFKit Plugin.