PTPDFViewCtrlToolDelegate

@protocol PTPDFViewCtrlToolDelegate <NSObject>

The methods declared by the PTPDFViewCtrlToolDelegate protocol allow the adopting delegate to be used as a Tool, in which specific responses to user input can be defined.

PDFNet include the Tools framework (/Lib/Tools) and associated source code, that implements a set of tools for annotation creation/modification, form filling, text selection, link following, and other UI operations.

  • Tells the receiver when one or more fingers touch down in the pdfScrollView.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
         onTouchesBegan:(nonnull NSSet<UITouch *> *)touches
              withEvent:(nullable UIEvent *)event;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, onTouchesBegan touches: Set<UITouch>, with event: UIEvent?) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    touches

    A set of UITouch instances that represent the touches for the starting phase of the event represented by event.

    event

    An object representing the event to which the touches belong.

    Return Value

    YES if the tool has handled the event, NO if it should be passed to a new tool of a different type.

  • Tells the receiver when one or more fingers associated with an event move within the pdfScrollView.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
         onTouchesMoved:(nonnull NSSet<UITouch *> *)touches
              withEvent:(nullable UIEvent *)event;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, onTouchesMoved touches: Set<UITouch>, with event: UIEvent?) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    touches

    A set of UITouch instances that represent the touches for the starting phase of the event represented by event.

    event

    An object representing the event to which the touches belong.

    Return Value

    YES if the tool has handled the event, NO if it should be passed to a new tool of a different type.

  • Tells the receiver when one or more fingers are raised from the pdfScrollView.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
         onTouchesEnded:(nonnull NSSet<UITouch *> *)touches
              withEvent:(nullable UIEvent *)event;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, onTouchesEnded touches: Set<UITouch>, with event: UIEvent?) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    touches

    A set of UITouch instances that represent the touches for the starting phase of the event represented by event.

    event

    An object representing the event to which the touches belong.

    Return Value

    YES if the tool has handled the event, NO if it should be passed to a new tool of a different type.

  • Sent to the receiver when a system event (such as a low-memory warning) cancels a touch event.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        onTouchesCancelled:(nonnull NSSet<UITouch *> *)touches
                 withEvent:(nullable UIEvent *)event;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, onTouchesCancelled touches: Set<UITouch>, with event: UIEvent?) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    touches

    A set of UITouch instances that represent the touches for the starting phase of the event represented by event.

    event

    An object representing the event to which the touches belong.

    Return Value

    YES if the tool has handled the event, NO if it should be passed to a new tool of a different type.

  • Tells the delegate that a long press has occured on the pdfScrollView.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        handleLongPress:(nonnull UILongPressGestureRecognizer *)gestureRecognizer;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, handleLongPress gestureRecognizer: UILongPressGestureRecognizer) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    gestureRecognizer

    The gesture recognizer that triggered the event.

    Return Value

    YES if the tool has handled the event, NO if it should be passed to a new tool of a different type.

  • Tells the delegate that a single tap has occured on the pdfScrollView.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
              handleTap:(nonnull UITapGestureRecognizer *)gestureRecognizer;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, handleTap gestureRecognizer: UITapGestureRecognizer) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    gestureRecognizer

    The gesture recognizer that trigger the event.

    Return Value

    YES if the tool has handled the event, NO if it should be passed to a new tool of a different type.

  • Tells the delegate that a double tap has occured on the pdfScrollView.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        handleDoubleTap:(nonnull UITapGestureRecognizer *)gestureRecognizer;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, handleDoubleTap gestureRecognizer: UITapGestureRecognizer) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    gestureRecognizer

    The gesture recognizer that trigger the event.

    Return Value

    YES if the tool has handled the event, NO if it should be passed to a new tool of a different type.

  • Returns whether to cancel touches related to the content subview and start dragging.

    This event cannot be forwarded to another tool.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        touchesShouldCancelInContentView:(nonnull UIView *)view;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, touchesShouldCancelInContentView view: UIView) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    view

    The pdfScrollVIew.

    Return Value

    `YES to cancel further touch messages to pdfScrollView, NO to have view continue to receive those messages.

  • Implemented to customize the default behavior when a finger touches down in the pdfScrollView.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        touchesShouldBegin:(nonnull NSSet<UITouch *> *)touches
                 withEvent:(nullable UIEvent *)event
             inContentView:(nonnull UIView *)view;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, touchesShouldBegin touches: Set<UITouch>, with event: UIEvent?, inContentView view: UIView) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    touches

    A set of UITouch instances that represent the touches for the starting phase of the event represented by event.

    event

    An object representing the event to which the touch objects in touches belong.

    view

    The subview in the content where the touch-down gesture occurred.

    Return Value

    YES if the tool has handled the event, NO if it should be passed to a new tool of a different type.

  • Tells the delegate when the user scrolls the content view within the receiver.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewDidScroll:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewDidScroll scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scrollview object in which the scrolling occurred.

  • Tells the delegate when the scroll view is about to start scrolling the content.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewWillBeginDragging:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewWillBeginDragging scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is about to scroll the content view.

  • Tells the delegate when dragging ended in the scroll view.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewDidEndDragging:(nonnull UIScrollView *)scrollView
                     willDecelerate:(BOOL)decelerate;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewDidEndDragging scrollView: UIScrollView, willDecelerate decelerate: Bool)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is about to scroll the content view.

    decelerate

    YES if the scrolling movement will continue, but decelerate, after a touch-up gesture during a dragging operation. If the value is NO, scrolling stops immediately upon touch-up.

  • Asks the delegate if the scroll view should scroll to the top of the content.

    If the delegate doesn’t implement this method, YES is assumed.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewShouldScrollToTop:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewShouldScrollToTop scrollView: UIScrollView) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that perform the scrolling operation.

    Return Value

    YES to permit scrolling to the top of the content, NO to disallow it.

  • Tells the delegate that the scroll view scrolled to the top of the content.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewDidScrollToTop:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewDidScrollToTop scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that perform the scrolling operation.

  • Tells the delegate that the scroll view is starting to decelerate the scrolling movement.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewWillBeginDecelerating:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewWillBeginDecelerating scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is decelerating the scrolling of the content view.

  • Tells the delegate that the scroll view has ended decelerating the scrolling movement.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewDidEndDecelerating:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewDidEndDecelerating scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is decelerating the scrolling of the content view.

  • Tells the delegate that zooming of the content in the scroll view is about to commence.

    This method is called at the beginning of zoom gestures and in cases where a change in zoom level is to be animated. You can use this method to store state information or perform any additional actions prior to zooming the view’s content.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewWillBeginZooming:(nonnull UIScrollView *)scrollView
                             withView:(nullable UIView *)view;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewWillBeginZooming scrollView: UIScrollView, with view: UIView?)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scrollview object displaying the content view.

    view

    The view object whose content is about to be zoomed.

  • Tells the delegate when the user zooms the content view within the receiver.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewDidEndZooming:(nonnull UIScrollView *)scrollView
                          withView:(nullable UIView *)view
                           atScale:(float)scale;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewDidEndZooming scrollView: UIScrollView, with view: UIView?, atScale scale: Float)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scrollview object in which the scrolling occurred.

    view

    The view object representing that part of the content view that needs to be scaled.

    scale

    The scale factor to use for scaling.

  • Tells the delegate that the scroll view’s zoom factor changed.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewDidZoom:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewDidZoom scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object whose zoom factor changed.

  • Tells the delegate when a scrolling animation in the scroll view concludes.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pdfScrollViewDidEndScrollingAnimation:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pdfScrollViewDidEndScrollingAnimation scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is performing the scrolling animation.

  • Tells the delegate when the user scrolls the content view within the receiver.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewDidScroll:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewDidScroll scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scrollview object in which the scrolling occurred.

  • Tells the delegate when the scroll view is about to start scrolling the content.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewWillBeginDragging:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewWillBeginDragging scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is about to scroll the content view.

  • Tells the delegate when dragging ended in the scroll view.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewDidEndDragging:(nonnull UIScrollView *)scrollView
                       willDecelerate:(BOOL)decelerate;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewDidEndDragging scrollView: UIScrollView, willDecelerate decelerate: Bool)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is about to scroll the content view.

    decelerate

    YES if the scrolling movement will continue, but decelerate, after a touch-up gesture during a dragging operation. If the value is NO, scrolling stops immediately upon touch-up.

  • Asks the delegate if the scroll view should scroll to the top of the content.

    If the delegate doesn’t implement this method, YES is assumed.

    Declaration

    Objective-C

    - (BOOL)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewShouldScrollToTop:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewShouldScrollToTop scrollView: UIScrollView) -> Bool

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that perform the scrolling operation.

    Return Value

    YES to permit scrolling to the top of the content, NO to disallow it.

  • Tells the delegate that the scroll view scrolled to the top of the content.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewDidScrollToTop:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewDidScrollToTop scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that perform the scrolling operation.

  • Tells the delegate that the scroll view is starting to decelerate the scrolling movement.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewWillBeginDecelerating:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewWillBeginDecelerating scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is decelerating the scrolling of the content view.

  • Tells the delegate that the scroll view has ended decelerating the scrolling movement.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewDidEndDecelerating:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewDidEndDecelerating scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is decelerating the scrolling of the content view.

  • Tells the delegate that zooming of the content in the scroll view is about to commence.

    This method is called at the beginning of zoom gestures and in cases where a change in zoom level is to be animated. You can use this method to store state information or perform any additional actions prior to zooming the view’s content.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewWillBeginZooming:(nonnull UIScrollView *)scrollView
                               withView:(nullable UIView *)view;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewWillBeginZooming scrollView: UIScrollView, with view: UIView?)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scrollview object displaying the content view.

    view

    The view object whose content is about to be zoomed.

  • Tells the delegate when the user zooms the content view within the receiver.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewDidEndZooming:(nonnull UIScrollView *)scrollView
                            withView:(nullable UIView *)view
                             atScale:(float)scale;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewDidEndZooming scrollView: UIScrollView, with view: UIView?, atScale scale: Float)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scrollview object in which the scrolling occurred.

    view

    The view object representing that part of the content view that needs to be scaled.

    scale

    The scale factor to use for scaling.

  • Tells the delegate that the scroll view’s zoom factor changed.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewDidZoom:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewDidZoom scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object whose zoom factor changed.

  • Tells the delegate when a scrolling animation in the scroll view concludes.

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        outerScrollViewDidEndScrollingAnimation:(nonnull UIScrollView *)scrollView;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, outerScrollViewDidEndScrollingAnimation scrollView: UIScrollView)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    scrollView

    The scroll-view object that is performing the scrolling animation.

  • Tells the delegate that the page layout has changed (such as from cover to cover facing).

    Declaration

    Objective-C

    - (void)pdfViewCtrlOnLayoutChanged:(nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    optional func pdfViewCtrl(onLayoutChanged pdfViewCtrl: PTPDFViewCtrl)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

  • Tells the delegate that the current page number changes. *

    • - parameter: pdfViewCtrl The PDFViewCtrl for which this event occurred. *
    • - parameter: oldPageNumber The previous page number. *
    • - parameter: newPageNumber The new page number. *

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        pageNumberChangedFrom:(int)oldPageNumber
                           To:(int)newPageNumber;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, pageNumberChangedFrom oldPageNumber: Int32, to newPageNumber: Int32)
  • Tells the delegate that PTPDFViewCtrl has opened a new document via its selector setDoc.

    Declaration

    Objective-C

    - (void)pdfViewCtrlOnSetDoc:(nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    optional func pdfViewCtrl(onSetDoc pdfViewCtrl: PTPDFViewCtrl)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

  • Tells the delegate that PTPDFViewCtrl has closed the current document.

    Declaration

    Objective-C

    - (void)pdfViewCtrlDidCloseDoc:(nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    optional func pdfViewCtrlDidCloseDoc(_ pdfViewCtrl: PTPDFViewCtrl)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

  • Tells the delegate that a render job is complete.

    Declaration

    Objective-C

    - (void)pdfViewCtrlOnRenderFinished:(nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    optional func pdfViewCtrl(onRenderFinished pdfViewCtrl: PTPDFViewCtrl)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

  • Generic event callback system for javascript action. Can be used to handle alert event which pops up a window with alert message

    Declaration

    Objective-C

    - (void)pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl
        javascriptCallback:(nullable const char *)event_type
                      json:(nullable const char *)json;

    Swift

    optional func pdfViewCtrl(_ pdfViewCtrl: PTPDFViewCtrl, javascriptCallback event_type: UnsafePointer<Int8>?, json: UnsafePointer<Int8>?)

    Parameters

    pdfViewCtrl

    The PDFViewCtrl for which this event occurred.

    event_type

    type name of the event, such as ‘alert’

    json

    the object that contains event data