Platforms to show: All Mac Windows Linux Cross-Platform
PDFViewMBS class
Super class: NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | PDFKit | MBS PDFKit Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
PDFView may be the only class you need to deal with for adding PDF functionality to your application. It lets you display PDF data and allows users to select content, navigate through a document, set zoom level, and copy textual content to the Pasteboard. PDFView also keeps track of page history.
You can subclass PDFView to create a custom PDF viewer or better use our CustomPDFViewMBS class.
You can also create a custom PDF viewer by using the PDF Kit utility classes directly and not using PDFView at all.
You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.
- 33 properties
- property acceptsDraggedFiles as Boolean
- property allowsDragging as Boolean
- property autoScales as Boolean
- property backgroundColor as NSColorMBS
- property canGoBack as Boolean
- property canGoForward as Boolean
- property canGoToFirstPage as Boolean
- property canGoToLastPage as Boolean
- property canGoToNextPage as Boolean
- property canGoToPreviousPage as Boolean
- property canZoomIn as Boolean
- property canZoomOut as Boolean
- property currentDestination as PDFDestinationMBS
- property currentPage as PDFPageMBS
- property currentSelection as PDFSelectionMBS
- property displayBox as Integer
- property displayDirection as Integer
- property displayMode as Integer
- property displaysAsBook as Boolean
- property displaysPageBreaks as Boolean
- property displaysRTL as Boolean
- property document as PDFDocumentMBS
- property documentView as NSViewMBS
- property enableDataDetectors as Boolean
- property greekingThreshold as Double
- property interpolationQuality as Integer
- property maxScaleFactor as Double
- property minScaleFactor as Double
- property pageBreakMargins as NSEdgeInsetsMBS
- property pageShadowsEnabled as Boolean
- property scaleFactor as Double
- property scaleFactorForSizeToFit as Double
- property shouldAntiAlias as Boolean
- 39 methods
- method annotationsChangedOnPage(page as PDFPageMBS)
- method areaOfInterestForMouse(e as NSEventMBS) as Integer
- method areaOfInterestForPoint(p as NSPointMBS) as integer
- method clearSelection
- method Constructor
- method Constructor(Handle as Integer)
- method Constructor(left as Double, top as Double, width as Double, height as Double)
- method convertPointFromPage(point as NSPointMBS, page as PDFPageMBS) as NSPointMBS
- method convertPointToPage(point as NSPointMBS, page as PDFPageMBS) as NSPointMBS
- method convertRectFromPage(rect as NSRectMBS, page as PDFPageMBS) as NSRectMBS
- method convertRectToPage(rect as NSRectMBS, page as PDFPageMBS) as NSRectMBS
- method copy
- method drawPage(page as PDFPageMBS)
- method drawPagePost(page as PDFPageMBS)
- method goBack
- method goForward
- method goToDestination(page as PDFDestinationMBS)
- method goToFirstPage
- method goToLastPage
- method goToNextPage
- method goToPage(page as PDFPageMBS)
- method goToPreviousPage
- method goToRect(rect as NSRectMBS, page as PDFPageMBS)
- method goToSelection(page as PDFSelectionMBS)
- method highlightedSelections as PDFSelectionMBS()
- method layoutDocumentView
- method pageForPoint(point as NSPointMBS, nearest as boolean) as PDFPageMBS
- method performAction(action as PDFActionMBS)
- method printWithInfo(printInfo as NSRectMBS, autoRotate as Boolean)
- method printWithInfo(printInfo as NSRectMBS, autoRotate as Boolean, pageScaling as Integer)
- method rowSizeForPage(page as PDFPageMBS) as NSSizeMBS
- method scrollSelectionToVisible
- method selectAll
- method setCurrentSelection(selection as PDFSelectionMBS, animate as boolean)
- method setCursorForAreaOfInterest(area as Integer)
- method setHighlightedSelections(selections() as PDFSelectionMBS)
- method visiblePages as PDFPageMBS()
- method zoomIn
- method zoomOut
- 12 shared methods
- shared method PDFViewAnnotationHitNotification as string
- shared method PDFViewAnnotationWillHitNotification as string
- shared method PDFViewChangedHistoryNotification as string
- shared method PDFViewCopyPermissionNotification as string
- shared method PDFViewDisplayBoxChangedNotification as string
- shared method PDFViewDisplayModeChangedNotification as string
- shared method PDFViewDocumentChangedNotification as string
- shared method PDFViewPageChangedNotification as string
- shared method PDFViewPrintPermissionNotification as string
- shared method PDFViewScaleChangedNotification as string
- shared method PDFViewSelectionChangedNotification as string
- shared method PDFViewVisiblePagesChangedNotification as string
- 19 constants
PDF Area Of Interest
Constant | Value | Description |
---|---|---|
kPDFAnnotationArea | 4 |
The mouse is over an annotation. |
kPDFControlArea | 16 |
The mouse is over a control. |
kPDFIconArea | 64 |
The mouse is over an icon. Available in Mac OS X v10.5 and later. |
kPDFImageArea | 256 |
Over an image. |
kPDFLinkArea | 8 |
The mouse is over a link. |
kPDFNoArea | 0 |
The mouse is over an undefined area. |
kPDFPageArea | 1 |
The mouse is over a page. |
kPDFPopupArea | 128 |
The mouse is over a popup menu. |
kPDFTextArea | 2 |
The mouse is over text. |
kPDFTextFieldArea | 32 |
The mouse is over a text field. |
Display Directions
Constant | Value | Description |
---|---|---|
kPDFDisplayDirectionHorizontal | 1 |
Horizontal |
kPDFDisplayDirectionVertical | 0 |
Vertical |
Display Mode
Constant | Value | Description |
---|---|---|
kPDFDisplaySinglePage | 0 |
The document displays one page at a time horizontally and vertically. Vertical and horizontal scrolling apply only to the current page. |
kPDFDisplaySinglePageContinuous | 1 |
he document displays in continuous mode vertically, with single-page width horizontally. Vertical scrolling applies to the entire document. |
kPDFDisplayTwoUp | 2 |
The document displays two pages side-by-side. Vertical and horizontal scrolling apply only to the pair of displayed pages. |
kPDFDisplayTwoUpContinuous | 3 |
The document displays in continuous mode vertically and displays two pages side-by-side horizontally. Vertical scrolling applies to the entire document. |
Interpolation Quality Constants
Constant | Value | Description |
---|---|---|
kPDFInterpolationQualityHigh | 2 |
high |
kPDFInterpolationQualityLow | 1 |
low |
kPDFInterpolationQualityNone | 0 |
Super class NSViewMBS
- 43 properties
- property acceptsTouchEvents as boolean
- property allowsVibrancy as Boolean
- property alphaValue as Double
- property autoresizesSubviews as boolean
- property autoresizingMask as Integer
- property bounds as NSRectMBS
- property boundsRotation as Double
- property canBecomeKeyView as boolean
- property canDraw as boolean
- property canDrawConcurrently as boolean
- property className as string
- property classPath as string
- property clipsToBounds as Boolean
- property focusRingType as Integer
- property frame as NSRectMBS
- property frameCenterRotation as Double
- property frameHeight as Double
- property frameLeft as Double
- property frameRotation as Double
- property frameTop as Double
- property frameWidth as Double
- property identifier as string
- property isFlipped as Boolean
- property isHidden as Boolean
- property isHiddenOrHasHiddenAncestor as Boolean
- property isOpaque as Boolean
- property isRotatedFromBase as Boolean
- property isRotatedOrScaledFromBase as Boolean
- property layer as Variant
- property layerUsesCoreImageFilters as Boolean
- property needsDisplay as Boolean
- property nextKeyView as NSViewMBS
- property opaqueAncestor as NSViewMBS
- property RetainCount as Integer
- property superview as NSViewMBS
- property toolTip as string
- property userInteractionEnabled as Boolean
- property visibleRect as NSRectMBS
- property wantsDefaultClipping as boolean
- property wantsLayer as Boolean
- property wantsRestingTouches as boolean
- property window as NSWindowMBS
- property compositingFilter as variant
- 57 methods
- method addSubview(subview as NSViewMBS)
- method addSubview(subview as NSViewMBS, positioned as Integer, relativeToView as NSViewMBS)
- method addToolTipRect(rect as NSRectMBS, tooltip as NSViewTooltipMBS)
- method ancestorSharedWithView(view as NSViewMBS) as NSViewMBS
- method animator as NSViewMBS
- method backgroundFilters as variant()
- method beginDraggingSessionWithItems(items() as Variant, e as NSEventMBS, source as NSViewMBS) as Variant
- method Constructor
- method Constructor(Handle as Integer)
- method Constructor(left as Double, top as Double, width as Double, height as Double)
- method contentFilters as variant()
- method convertPointFromView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS
- method convertPointToView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS
- method convertRectFromView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS
- method convertRectToView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS
- method convertSizeFromView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS
- method convertSizeToView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS
- method dataWithEPSInsideRect(left as Double, top as Double, width as Double, height as Double) as Memoryblock
- method dataWithPDFInsideRect(left as Double, top as Double, width as Double, height as Double) as Memoryblock
- method dataWithPDFInsideRect(r as NSRectMBS) as Memoryblock
- method dragImage(image as NSImageMBS, viewLocation as NSPointMBS, offset as NSSizeMBS, NSEvent as NSEventMBS, pboard as NSPasteboardMBS, source as NSViewMBS, slideFlag as boolean)
- method drawFocusRingMask
- method enclosingMenuItem as Variant
- method enclosingScrollView as Variant
- method focusRingMaskBounds as NSRectMBS
- method isDescendantOf(view as NSViewMBS) as boolean
- method makeBackingLayer as Variant
- method nextValidKeyView as NSViewMBS
- method noteFocusRingMaskChanged
- method pageFooter as NSAttributedStringMBS
- method pageHeader as NSAttributedStringMBS
- method previousKeyView as NSViewMBS
- method previousValidKeyView as NSViewMBS
- method print
- method registeredDraggedTypes as string()
- method registerForDraggedTypes(Types() as string)
- method removeAllToolTips
- method removeFromSuperview
- method removeFromSuperviewWithoutNeedingDisplay
- method RenderImage(subviews as boolean = false, flipped as boolean = false) as variant
- method replaceSubview(oldView as NSViewMBS, newView as NSViewMBS)
- method rotateByAngle(angle as Double)
- method scaleUnitSquareToSize(size as NSSizeMBS)
- method Screenshot as Picture
- method setBackgroundFilters(Filters() as variant)
- method setBoundsOrigin(origin as NSPointMBS)
- method setBoundsOrigin(x as Double, y as Double)
- method setBoundsSize(size as NSSizeMBS)
- method setBoundsSize(width as Double, height as Double)
- method setContentFilters(Filters() as variant)
- method setFocus
- method setFrameOrigin(origin as NSPointMBS)
- method setFrameOrigin(x as Double, y as Double)
- method setFrameSize(size as NSSizeMBS)
- method setFrameSize(width as Double, height as Double)
- method subviews(recursive as boolean = false) as NSViewMBS()
- method unregisterDraggedTypes
- 5 shared methods
- shared method NSViewBoundsDidChangeNotification as string
- shared method NSViewDidUpdateTrackingAreasNotification as string
- shared method NSViewFocusDidChangeNotification as string
- shared method NSViewFrameDidChangeNotification as string
- shared method NSViewGlobalFrameDidChangeNotification as string
- 21 constants
Constants
Constant | Value | Description |
---|---|---|
NSBezelBorder | 2 |
One of the constants to specify the type of a view's border.
A concave border that makes the view look sunken. |
NSFocusRingTypeDefault | 0 |
One of the constants for the focusringtype property.
The default focus ring type for NSView or NSCell. |
NSFocusRingTypeExterior | 2 |
One of the constants for the focusringtype property.
The standard Aqua focus ring. |
NSFocusRingTypeNone | 1 |
One of the constants for the focusringtype property.
No focus ring. If you set the focus ring type to this value, NSView and NSCell will not draw any focus ring. |
NSGrooveBorder | 3 |
One of the constants to specify the type of a view's border.
A thin border that looks etched around the image. |
NSLineBorder | 1 |
One of the constants to specify the type of a view's border.
A black line border around the view. |
NSNoBorder | 0 |
One of the constants to specify the type of a view's border.
No border. |
NSViewHeightSizable | 16 |
One of the constants for the autoresizingMask property.
The receiver's height is flexible. |
NSViewLayerContentsRedrawBeforeViewResize | 3 | One of the view layer content redraw policy constants. |
NSViewLayerContentsRedrawDuringViewResize | 2 | One of the view layer content redraw policy constants. |
NSViewLayerContentsRedrawNever | 0 | One of the view layer content redraw policy constants. |
NSViewLayerContentsRedrawOnSetNeedsDisplay | 1 | One of the view layer content redraw policy constants. |
NSViewMaxXMargin | 4 |
One of the constants for the autoresizingMask property.
The right margin between the receiver and its superview is flexible. |
NSViewMaxYMargin | 32 |
One of the constants for the autoresizingMask property.
The top margin between the receiver and its superview is flexible. |
NSViewMinXMargin | 1 |
One of the constants for the autoresizingMask property.
The left margin between the receiver and its superview is flexible. |
NSViewMinYMargin | 8 |
One of the constants for the autoresizingMask property.
The bottom margin between the receiver and its superview is flexible. |
NSViewNotSizable | 0 |
One of the constants for the autoresizingMask property.
The receiver cannot be resized. |
NSViewWidthSizable | 2 |
One of the constants for the autoresizingMask property.
The receiver's width is flexible. |
Window Order Constants
Constant | Value | Description |
---|---|---|
NSWindowAbove | 1 |
Moves the window above the indicated window. |
NSWindowBelow | -1 |
Moves the window below the indicated window. |
NSWindowOut | 0 |
Moves the window off the screen. |
Super class NSResponderMBS
- 3 properties
- property Handle as Integer
- property menu as NSMenuMBS
- property nextResponder as NSResponderMBS
- 123 methods
- method beginGestureWithEvent(e as NSEventMBS)
- method cancelOperation
- method capitalizeWord
- method centerSelectionInVisibleArea
- method changeCaseOfLetter
- method complete
- method Constructor Private
- method cursorUpdate(e as NSEventMBS)
- method deleteBackward
- method deleteBackwardByDecomposingPreviousCharacter
- method deleteForward
- method deleteToBeginningOfLine
- method deleteToBeginningOfParagraph
- method deleteToEndOfLine
- method deleteToEndOfParagraph
- method deleteToMark
- method deleteWordBackward
- method deleteWordForward
- method endGestureWithEvent(e as NSEventMBS)
- method flagsChanged(e as NSEventMBS)
- method flushBufferedKeyEvents
- method helpRequested(e as NSEventMBS)
- method indent
- method insertBacktab
- method insertContainerBreak
- method insertDoubleQuoteIgnoringSubstitution
- method insertLineBreak
- method insertNewline
- method insertNewlineIgnoringFieldEditor
- method insertParagraphSeparator
- method insertSingleQuoteIgnoringSubstitution
- method insertTab
- method insertTabIgnoringFieldEditor
- method keyDown(e as NSEventMBS)
- method keyUp(e as NSEventMBS)
- method lowercaseWord
- method magnifyWithEvent(e as NSEventMBS)
- method makeBaseWritingDirectionLeftToRight
- method makeBaseWritingDirectionNatural
- method makeBaseWritingDirectionRightToLeft
- method makeTextWritingDirectionLeftToRight
- method makeTextWritingDirectionNatural
- method makeTextWritingDirectionRightToLeft
- method mouseDown(e as NSEventMBS)
- method mouseDragged(e as NSEventMBS)
- method mouseEntered(e as NSEventMBS)
- method mouseExited(e as NSEventMBS)
- method mouseMoved(e as NSEventMBS)
- method mouseUp(e as NSEventMBS)
- method moveBackward
- method moveBackwardAndModifySelection
- method moveDown
- method moveDownAndModifySelection
- method moveForward
- method moveForwardAndModifySelection
- method moveLeft
- method moveLeftAndModifySelection
- method moveParagraphBackwardAndModifySelection
- method moveParagraphForwardAndModifySelection
- method moveRight
- method moveRightAndModifySelection
- method moveToBeginningOfDocument
- method moveToBeginningOfDocumentAndModifySelection
- method moveToBeginningOfLine
- method moveToBeginningOfLineAndModifySelection
- method moveToBeginningOfParagraph
- method moveToBeginningOfParagraphAndModifySelection
- method moveToEndOfDocument
- method moveToEndOfDocumentAndModifySelection
- method moveToEndOfLine
- method moveToEndOfLineAndModifySelection
- method moveToEndOfParagraph
- method moveToEndOfParagraphAndModifySelection
- method moveToLeftEndOfLine
- method moveToLeftEndOfLineAndModifySelection
- method moveToRightEndOfLine
- method moveToRightEndOfLineAndModifySelection
- method moveUp
- method moveUpAndModifySelection
- method moveWordBackward
- method moveWordBackwardAndModifySelection
- method moveWordForward
- method moveWordForwardAndModifySelection
- method moveWordLeft
- method moveWordLeftAndModifySelection
- method moveWordRight
- method moveWordRightAndModifySelection
- method otherMouseDown(e as NSEventMBS)
- method otherMouseDragged(e as NSEventMBS)
- method otherMouseUp(e as NSEventMBS)
- method pageDown
- method pageDownAndModifySelection
- method pageUp
- method pageUpAndModifySelection
- method performMnemonic(theString as string) as boolean
- method presentError(e as NSErrorMBS) as boolean
- method rightMouseDown(e as NSEventMBS)
- method rightMouseDragged(e as NSEventMBS)
- method rightMouseUp(e as NSEventMBS)
- method rotateWithEvent(e as NSEventMBS)
- method scrollLineDown
- method scrollLineUp
- method scrollPageDown
- method scrollPageUp
- method scrollToBeginningOfDocument
- method scrollToEndOfDocument
- method scrollWheel(e as NSEventMBS)
- method selectAll
- method selectLine
- method selectParagraph
- method selectToMark
- method selectWord
- method setMark
- method showContextHelp
- method swapWithMark
- method swipeWithEvent(e as NSEventMBS)
- method tabletPoint(e as NSEventMBS)
- method tabletProximity(e as NSEventMBS)
- method transpose
- method transposeWords
- method undoManager as NSUndoManagerMBS
- method uppercaseWord
- method yank
Sub classes:
Some properties using for this class:
- DesktopPDFViewControlMBS.View as PDFViewMBS
- PDFThumbnailViewMBS.PDFView as PDFViewMBS
- PDFViewControlMBS.View as PDFViewMBS
- PDFViewIOSControlMBS.View as PDFViewMBS
Some examples using this class:
- /PDFKit/PDFView iOS Test
- /PDFKit/PDFView/PDFView
- /PDFKit/PDFView/PDFView customized
- /PDFKit/PDFView/PDFView customized with picture overlay
- /PDFKit/PDFView/PDFView overlay/PDFViewControl overlay
- /PDFKit/PDFViewControlMBS Test
Blog Entries
- PDF Viewer controls for iOS
- News from the MBS Xojo Plugins Version 21.1
- Have you checked out PDFViewMBS class?
- MBS REALbasic Plugins, version 10.6pr2
- MBS Plugins 10.3 Release Notes
- MBS REALbasic Plugins, version 10.3pr8
- MBS REALbasic Plugins, version 10.3pr4
The items on this page are in the following plugins: MBS MacBase Plugin, MBS PDFKit Plugin.
PDFThumbnailViewMBS - PermissionsMBS