PSPDFMutableRenderRequest

Objective-C


@interface PSPDFMutableRenderRequest : PSPDFRenderRequest

Swift

class MutableRenderRequest : RenderRequest

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

  • The index of the page that should be rendered from the document.

    This defaults to the first page.

    Declaration

    Objective-C

    @property (nonatomic) PSPDFPageIndex pageIndex;

    Swift

    var pageIndex: PageIndex { 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 (nonatomic) CGSize imageSize;

    Swift

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

    The rectangle that is described here is rendered as aspect fit into the given imageSize.

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

    Declaration

    Objective-C

    @property (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 (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 (nonatomic, copy, nullable) NSArray<PSPDFAnnotation *> *annotations;

    Swift

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

    Note

    The image will rendered by combining those options with the render options from the source document. Querying this property will not reflect the document options.

    Declaration

    Objective-C

    @property (nonatomic, copy) PSPDFRenderOptions *_Nonnull options;

    Swift

    @NSCopying var options: RenderOptions { get set }
  • Determines the cache policy that is used to fulfill the request. If the policy is set to PSPDFRenderRequestCachePolicyDefault (the default value) the request will try to fulfill the request as efficient as possible.

    Declaration

    Objective-C

    @property (nonatomic) PSPDFRenderRequestCachePolicy cachePolicy;

    Swift

    var cachePolicy: RenderRequest.CachePolicy { get set }
  • The user info dictionary can contain any arbitrary 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 (nonatomic, copy) NSDictionary *_Nonnull userInfo;

    Swift

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