PSPDFRenderTaskDelegate

Objective-C

@protocol PSPDFRenderTaskDelegate <NSObject>

Swift

protocol RenderTaskDelegate : NSObjectProtocol

Implement this delegate to get rendered pages. (Most of the times, you want to use PSPDFCache instead)

  • Called when a render task finishes successfully. Guaranteed to be called from the main thread.

    Declaration

    Objective-C

    - (void)renderTaskDidFinish:(nonnull PSPDFRenderTask *)task;

    Swift

    optional func renderTaskDidFinish(_ task: RenderTask)
  • Called when a render task fails. Guaranteed to be called from the main thread.

    Declaration

    Objective-C

    - (void)renderTask:(nonnull PSPDFRenderTask *)task
        didFailWithError:(nonnull NSError *)error;

    Swift

    optional func renderTask(_ task: RenderTask, didFailWithError error: Error)