Class PDFView

All Implemented Interfaces:
CALayerDelegate, NSCoding, NSObjectProtocol, UIAccessibilityIdentification, UIActivityItemsConfigurationProviding, UIAppearanceContainer, UICoordinateSpace, UIDynamicItem, UIFocusEnvironment, UIFocusItem, UIFocusItemContainer, UIGestureRecognizerDelegate, UILargeContentViewerItem, UIPasteConfigurationSupporting, UIResponderStandardEditActions, UITraitEnvironment, UIUserActivityRestoring, ObjCProtocol

public class PDFView
extends UIView
implements UIGestureRecognizerDelegate
Since:
Available in iOS 11.0 and later.
  • Constructor Details

    • PDFView

      public PDFView()
    • PDFView

      protected PDFView​(NSObject.Handle h, long handle)
    • PDFView

      protected PDFView​(NSObject.SkipInit skipInit)
    • PDFView

      public PDFView​(CGRect frame)
    • PDFView

      public PDFView​(NSCoder coder)
  • Method Details

    • getDocument

      public PDFDocument getDocument()
    • setDocument

      public void setDocument​(PDFDocument v)
    • canGoToFirstPage

      public boolean canGoToFirstPage()
    • canGoToLastPage

      public boolean canGoToLastPage()
    • canGoToNextPage

      public boolean canGoToNextPage()
    • canGoToPreviousPage

      public boolean canGoToPreviousPage()
    • canGoBack

      public boolean canGoBack()
    • canGoForward

      public boolean canGoForward()
    • getCurrentPage

      public PDFPage getCurrentPage()
    • getCurrentDestination

      public PDFDestination getCurrentDestination()
    • getDisplayMode

      public PDFDisplayMode getDisplayMode()
    • setDisplayMode

      public void setDisplayMode​(PDFDisplayMode v)
    • getDisplayDirection

      public PDFDisplayDirection getDisplayDirection()
      Since:
      Available in iOS 11.0 and later.
    • setDisplayDirection

      public void setDisplayDirection​(PDFDisplayDirection v)
      Since:
      Available in iOS 11.0 and later.
    • displaysPageBreaks

      public boolean displaysPageBreaks()
    • setDisplaysPageBreaks

      public void setDisplaysPageBreaks​(boolean v)
    • getPageBreakMargins

      public UIEdgeInsets getPageBreakMargins()
      Since:
      Available in iOS 11.0 and later.
    • setPageBreakMargins

      public void setPageBreakMargins​(UIEdgeInsets v)
      Since:
      Available in iOS 11.0 and later.
    • getDisplayBox

      public PDFDisplayBox getDisplayBox()
    • setDisplayBox

      public void setDisplayBox​(PDFDisplayBox v)
    • displaysAsBook

      public boolean displaysAsBook()
    • setDisplaysAsBook

      public void setDisplaysAsBook​(boolean v)
    • displaysRTL

      public boolean displaysRTL()
      Since:
      Available in iOS 11.0 and later.
    • setDisplaysRTL

      public void setDisplaysRTL​(boolean v)
      Since:
      Available in iOS 11.0 and later.
    • getBackgroundColor

      public UIColor getBackgroundColor()
      Overrides:
      getBackgroundColor in class UIView
    • setBackgroundColor

      public void setBackgroundColor​(UIColor v)
      Overrides:
      setBackgroundColor in class UIView
    • getInterpolationQuality

      public PDFInterpolationQuality getInterpolationQuality()
      Since:
      Available in iOS 11.0 and later.
    • setInterpolationQuality

      public void setInterpolationQuality​(PDFInterpolationQuality v)
      Since:
      Available in iOS 11.0 and later.
    • isPageShadowsEnabled

      public boolean isPageShadowsEnabled()
      Since:
      Available in iOS 12.0 and later.
    • setPageShadowsEnabled

      public void setPageShadowsEnabled​(boolean v)
      Since:
      Available in iOS 12.0 and later.
    • isUsingPageViewController

      public boolean isUsingPageViewController()
      Since:
      Available in iOS 11.0 and later.
    • getDelegate

      public PDFViewDelegate getDelegate()
    • setDelegate

      public void setDelegate​(PDFViewDelegate v)
    • getScaleFactor

      public double getScaleFactor()
    • setScaleFactor

      public void setScaleFactor​(double v)
    • getMinScaleFactor

      public double getMinScaleFactor()
      Since:
      Available in iOS 11.0 and later.
    • setMinScaleFactor

      public void setMinScaleFactor​(double v)
      Since:
      Available in iOS 11.0 and later.
    • getMaxScaleFactor

      public double getMaxScaleFactor()
      Since:
      Available in iOS 11.0 and later.
    • setMaxScaleFactor

      public void setMaxScaleFactor​(double v)
      Since:
      Available in iOS 11.0 and later.
    • isAutoScales

      public boolean isAutoScales()
    • setAutoScales

      public void setAutoScales​(boolean v)
    • getScaleFactorForSizeToFit

      public double getScaleFactorForSizeToFit()
      Since:
      Available in iOS 11.0 and later.
    • canZoomIn

      public boolean canZoomIn()
    • canZoomOut

      public boolean canZoomOut()
    • getCurrentSelection

      public PDFSelection getCurrentSelection()
    • setCurrentSelection

      public void setCurrentSelection​(PDFSelection v)
    • getHighlightedSelections

      public NSArray<PDFSelection> getHighlightedSelections()
      Since:
      Available in iOS 11.0 and later.
    • setHighlightedSelections

      public void setHighlightedSelections​(NSArray<PDFSelection> v)
      Since:
      Available in iOS 11.0 and later.
    • getDocumentView

      public UIView getDocumentView()
    • getVisiblePages

      public NSArray<PDFPage> getVisiblePages()
      Since:
      Available in iOS 11.0 and later.
    • isEnableDataDetectors

      public boolean isEnableDataDetectors()
      Since:
      Available in iOS 11.0 and later.
    • setEnableDataDetectors

      public void setEnableDataDetectors​(boolean v)
      Since:
      Available in iOS 11.0 and later.
    • getLayerClass

      public static Class<? extends CALayer> getLayerClass()
    • goToFirstPage

      public void goToFirstPage​(NSObject sender)
    • goToLastPage

      public void goToLastPage​(NSObject sender)
    • goToNextPage

      public void goToNextPage​(NSObject sender)
    • goToPreviousPage

      public void goToPreviousPage​(NSObject sender)
    • goBack

      public void goBack​(NSObject sender)
    • goForward

      public void goForward​(NSObject sender)
    • goToPage

      public void goToPage​(PDFPage page)
    • goToDestination

      public void goToDestination​(PDFDestination destination)
    • goToSelection

      public void goToSelection​(PDFSelection selection)
    • goToRect

      public void goToRect​(CGRect rect, PDFPage page)
    • usePageViewController

      public void usePageViewController​(boolean enable, NSDictionary<?,​?> viewOptions)
      Since:
      Available in iOS 11.0 and later.
    • zoomIn

      public void zoomIn​(NSObject sender)
    • zoomOut

      public void zoomOut​(NSObject sender)
    • areaOfInterestForMouse

      public PDFAreaOfInterest areaOfInterestForMouse​(UIEvent event)
    • areaOfInterestForPoint

      public PDFAreaOfInterest areaOfInterestForPoint​(CGPoint cursorLocation)
    • performAction

      public void performAction​(PDFAction action)
      Since:
      Available in iOS 11.0 and later.
    • setCurrentSelection

      public void setCurrentSelection​(PDFSelection selection, boolean animate)
      Since:
      Available in iOS 11.0 and later.
    • clearSelection

      public void clearSelection()
    • selectAll

      public void selectAll​(NSObject sender)
      Specified by:
      selectAll in interface UIResponderStandardEditActions
      Overrides:
      selectAll in class UIResponder
    • scrollSelectionToVisible

      public void scrollSelectionToVisible​(NSObject sender)
    • drawPage

      public void drawPage​(PDFPage page, CGContext context)
      Since:
      Available in iOS 11.0 and later.
    • drawPagePost

      public void drawPagePost​(PDFPage page, CGContext context)
      Since:
      Available in iOS 11.0 and later.
    • copy

      public void copy​(NSObject sender)
      Specified by:
      copy in interface UIResponderStandardEditActions
      Overrides:
      copy in class UIResponder
    • pageForPoint

      public PDFPage pageForPoint​(CGPoint point, boolean nearest)
    • convertPointToPage

      public CGPoint convertPointToPage​(CGPoint point, PDFPage page)
    • convertRectToPage

      public CGRect convertRectToPage​(CGRect rect, PDFPage page)
    • convertPointFromPage

      public CGPoint convertPointFromPage​(CGPoint point, PDFPage page)
    • convertRectFromPage

      public CGRect convertRectFromPage​(CGRect rect, PDFPage page)
    • layoutDocumentView

      public void layoutDocumentView()
    • annotationsChangedOnPage

      public void annotationsChangedOnPage​(PDFPage page)
      Since:
      Available in iOS 11.0 and later.
    • rowSizeForPage

      public CGSize rowSizeForPage​(PDFPage page)
    • getUserInterfaceLayoutDirection

      public static UIUserInterfaceLayoutDirection getUserInterfaceLayoutDirection​(UISemanticContentAttribute attribute)
      Since:
      Available in iOS 9.0 and later.
    • getUserInterfaceLayoutDirection

      public static UIUserInterfaceLayoutDirection getUserInterfaceLayoutDirection​(UISemanticContentAttribute semanticContentAttribute, UIUserInterfaceLayoutDirection layoutDirection)
      Since:
      Available in iOS 10.0 and later.
    • shouldBegin

      public boolean shouldBegin​(UIGestureRecognizer gestureRecognizer)
      Specified by:
      shouldBegin in interface UIGestureRecognizerDelegate
    • shouldRecognizeSimultaneously

      public boolean shouldRecognizeSimultaneously​(UIGestureRecognizer gestureRecognizer, UIGestureRecognizer otherGestureRecognizer)
      Specified by:
      shouldRecognizeSimultaneously in interface UIGestureRecognizerDelegate
    • shouldRequireFailure

      public boolean shouldRequireFailure​(UIGestureRecognizer gestureRecognizer, UIGestureRecognizer otherGestureRecognizer)
      Specified by:
      shouldRequireFailure in interface UIGestureRecognizerDelegate
    • shouldBeRequiredToFail

      public boolean shouldBeRequiredToFail​(UIGestureRecognizer gestureRecognizer, UIGestureRecognizer otherGestureRecognizer)
      Specified by:
      shouldBeRequiredToFail in interface UIGestureRecognizerDelegate
    • shouldReceiveTouch

      public boolean shouldReceiveTouch​(UIGestureRecognizer gestureRecognizer, UITouch touch)
      Specified by:
      shouldReceiveTouch in interface UIGestureRecognizerDelegate
    • shouldReceivePress

      public boolean shouldReceivePress​(UIGestureRecognizer gestureRecognizer, UIPress press)
      Specified by:
      shouldReceivePress in interface UIGestureRecognizerDelegate
    • shouldReceiveEvent

      public boolean shouldReceiveEvent​(UIGestureRecognizer gestureRecognizer, UIEvent event)
      Specified by:
      shouldReceiveEvent in interface UIGestureRecognizerDelegate
      Since:
      Available in iOS 13.4 and later.