PSPDFRenderOptions


@interface PSPDFRenderOptions : PSPDFModel <NSSecureCoding>

Defines the options to apply when rendering PDF pages, such as color inversion, filters, colors and annotation behavior.

  • Changes the rendering to preserve the aspect ratio of the image. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL preserveAspectRatio;

    Swift

    var preserveAspectRatio: Bool { get set }
  • Controls whether the image is forced to render with a scale of 1.0. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL ignoreDisplaySettings;

    Swift

    var ignoreDisplaySettings: Bool { get set }
  • A color that is multiplied with the page content to color the pages. Defaults to UIColor.clearColor. If the page content draws a white square, the resulting color of that square will be pageColor. To set a background without tinting the page content, use backgroundFill instead.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIColor *_Nonnull pageColor;

    Swift

    var pageColor: UIColor { get set }
  • Inverts the rendering output. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL invertRenderColor;

    Swift

    var invertRenderColor: Bool { get set }
  • Filters to be applied. Filters will increase rendering time. Defaults to no filters.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) PSPDFRenderFilter filters;

    Swift

    var filters: PSPDFRenderFilter { get set }
  • Set custom interpolation quality. Defaults to kCGInterpolationHigh.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        CGInterpolationQuality interpolationQuality;

    Swift

    var interpolationQuality: CGInterpolationQuality { get set }
  • Set to YES to NOT draw page content. Defaults to NO. (Use to just draw an annotation).

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL skipPageContent;

    Swift

    var skipPageContent: Bool { get set }
  • Set to YES to render annotations that have isOverlay = YES set. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL overlayAnnotations;

    Swift

    var overlayAnnotations: Bool { get set }
  • Skip rendering of any annotations that are in this array.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        NSArray<PSPDFAnnotation *> *skipAnnotationArray;

    Swift

    var skipAnnotationArray: [PSPDFAnnotation]? { get set }
  • If YES, will draw outside of page area. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL ignorePageClip;

    Swift

    var ignorePageClip: Bool { get set }
  • Enables/Disables antialiasing. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL allowAntialiasing;

    Swift

    var allowAntialiasing: Bool { get set }
  • The page base color. Page content is drawn on top of this fill. Defaults to UIColor.whiteColor. If the page content draws a white square, the resulting color of that square will be white regardless of the backgroundFill. To tint the page content too, use pageColor instead.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIColor *_Nonnull backgroundFill;

    Swift

    var backgroundFill: UIColor { get set }
  • Whether native text rendering via Core Graphics should be used. Defaults to YES.

    Note

    Native text rendering usually yields better results but is slower.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL renderTextUsingCoreGraphics;

    Swift

    var renderTextUsingCoreGraphics: Bool { get set }
  • Sets the interactive fill color, which will override the fill color for all newly rendered form elements that are editable.

    The interactive fill color is used if a form element is editable by the user to indicate that the user can interact with this form element.

    If this value is set, it will always be used if the element is editable and the fillColor specified by the PDF is ignored. Remove this key to use the fill color specified in the PDF.

    Defaults to a non-nil, light blue color.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        UIColor *interactiveFormFillColor;

    Swift

    var interactiveFormFillColor: UIColor? { get set }
  • Allows custom content rendering after the PDF.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        PSPDFRenderDrawBlock drawBlock;

    Swift

    var drawBlock: PSPDFRenderDrawBlock? { get set }
  • Controls if the Sign here overlay should be shown on unsigned signature fields. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL drawSignHereOverlay;

    Swift

    var drawSignHereOverlay: Bool { get set }
  • Controls if redaction annotations should be drawn in their redacted state, to preview the appearance of how they would look if applied. By default redactions are rendered in their marked state.

    Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL drawRedactionsAsRedacted;

    Swift

    var drawRedactionsAsRedacted: Bool { get set }
  • CIFilter that are applied to the rendered image before it is returned from the render pipeline.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        NSArray<CIFilter *> *additionalCIFilters;

    Swift

    var additionalCIFilters: [CIFilter]? { get set }
  • Whether the annotations are drawn flattened when processing a document. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL drawFlattened;

    Swift

    var drawFlattened: Bool { get set }
  • Set to YES to specify that the annotation is being drawn for printing. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL drawForPrinting;

    Swift

    var drawForPrinting: Bool { get set }
  • If the annotation should be rendered centered within it’s own context. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL centered;

    Swift

    var centered: Bool { get set }
  • The margin that should be applied to the drawing annotation. Defaults to (0,0,0,0).

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIEdgeInsets margin;

    Swift

    var margin: UIEdgeInsets { get set }
  • Whether the annotation’s appearance stream should be rendered. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL drawAppearanceStream;

    Swift

    var drawAppearanceStream: Bool { get set }
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (nullable instancetype)initWithCoder:(nonnull NSCoder *)aDecoder;
  • Unavailable

    Not the designated initializer

    Declaration

    Objective-C

    - (nullable instancetype)
        initWithDictionary:(nullable NSDictionary<NSString *, id> *)dictionaryValue
                     error:(NSError *_Nullable *_Nullable)error;