PSPDFMutableRenderRequest


@interface PSPDFMutableRenderRequest : PSPDFRenderRequest

The mutual version of a render request can be used to configure it so that it matches the desired request.

  • The document that this object is requesting an image rendering from.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) PSPDFDocument *_Nonnull document;

    Swift

    var document: PSPDFDocument { get set }
  • The index of the page that should be rendered from the document.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSUInteger pageIndex;

    Swift

    var pageIndex: UInt { get set }
  • The requested size of the rendered image.

    Note

    The actual image might be of a different size as the rendered image will have the aspect ratio of pdfRect or the full pdf page, in case you don’t specify a pdfRect. The resulting image will be rendered aspect-fit inside the requested imageSize, meaning in the resulting image at least one axis will be equal to the requested one and the other might be smaller.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGSize imageSize;

    Swift

    var imageSize: CGSize { get set }
  • The rect in pdf coordinates defining the area of the page that should be rendered.

    The rect that is described here is rendered as aspect fit into the given renderSize.

    Defaults to CGRectNull, which means the full page is rendered.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGRect pdfRect;

    Swift

    var pdfRect: CGRect { get set }
  • The scale factor the image should be rendered in.

    Defaults to 0.0 which will use the main screen’s scale factor on iOS and on macOS will always use 1.0.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat imageScale;

    Swift

    var imageScale: CGFloat { get set }
  • Contains the annotations to be rendered in the image.

    If this property contains an empty array, no annotations will be rendered in the image. If this property is nil, all annotations will be rendered in the image (the default).

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        NSArray<__kindof PSPDFAnnotation *> *annotations;

    Swift

    var annotations: [PSPDFAnnotation]? { get set }
  • Contains additional render options that should be used when rendering the image.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic)
        NSDictionary<NSString *, id> *_Nonnull options;

    Swift

    var options: [String : Any] { get set }
  • Determines the cache policy that is used to fullfill the request. If the policy is set to PSPDFRenderRequestCachePolicyDefault (the default value) the request will try to fullfill the request as efficient as possible.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        PSPDFRenderRequestCachePolicy cachePolicy;

    Swift

    var cachePolicy: PSPDFRenderRequestCachePolicy { get set }
  • The user info dictionary can contain any arbitraty user info that is just passed through. Content in this dictionary is not touched at all and has no impact on the render result.

    Note

    Two render requests with different user info content can still be equal.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSDictionary *_Nonnull userInfo;

    Swift

    var userInfo: [AnyHashable : Any] { get set }