PSPDFRenderOptions

Objective-C


@interface PSPDFRenderOptions : PSPDFModel

Swift

class RenderOptions : ModelObject

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 false.

    Declaration

    Objective-C

    @property (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 false.

    Declaration

    Objective-C

    @property (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 (nonatomic) UIColor *_Nonnull pageColor;

    Swift

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

    Declaration

    Objective-C

    @property (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 (nonatomic) PSPDFRenderFilter filters;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic) CGInterpolationQuality interpolationQuality;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic) BOOL skipPageContent;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic) BOOL overlayAnnotations;

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic) BOOL ignorePageClip;

    Swift

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

    Declaration

    Objective-C

    @property (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 (nonatomic) UIColor *_Nonnull backgroundFill;

    Swift

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

    Note

    Native text rendering usually yields better results but is slower.

    Declaration

    Objective-C

    @property (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.

    Note

    This color is overlaid on top of the form contents. It is recommended to use a color with low alpha to ensure the content is still legible with the overlay applied.

    Defaults to a non-nil, translucent blue color.

    Declaration

    Objective-C

    @property (nonatomic, nullable) UIColor *interactiveFormFillColor;

    Swift

    var interactiveFormFillColor: UIColor? { get set }
  • Sets the border color for required form fields. It is used when a form element is marked as required to indicate a non-optional form element. Setting this property to clear color will make the border invisible.

    If this value is not set, the required form field border color defaults to red.

    Declaration

    Objective-C

    @property (nonatomic, nullable) UIColor *requiredFormBorderColor;

    Swift

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

    Declaration

    Objective-C

    @property (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 true.

    Declaration

    Objective-C

    @property (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 false.

    Declaration

    Objective-C

    @property (nonatomic) BOOL drawRedactionsAsRedacted;

    Swift

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

    Warning

    Important: When customizing this property, please make sure to not use the same kind of CIFilter with different input parameters without customizing its name. RenderOptions are equality checked during cache lookup. Using the standard implementation of CIFilter can cause overhead to the point of making PSPDFKit unusable and is therefore substituted with a mere name check on the objects in this array.

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic) BOOL drawFlattened;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic) BOOL drawForPrinting;

    Swift

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

    Declaration

    Objective-C

    @property (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 (nonatomic) UIEdgeInsets margin;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic) BOOL drawAppearanceStream;

    Swift

    var drawAppearanceStream: Bool { get set }
  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

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

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

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