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 bepageColor
. To set a background without tinting the page content, usebackgroundFill
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 haveisOverlay = YES
set. Defaults tofalse
.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 tofalse
.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 thebackgroundFill
. For a transparent background please set this property tonil
. Setting this toclear
instead will yield unexpected results. To tint the page content too, usepageColor
instead.Declaration
Objective-C
@property (nonatomic, nullable) UIColor *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.
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. Setting this property to nil will also result in this default color being used.
Set this property to clear to use the appearance specified in the PDF.
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.
PSPDFKit’s render cache will not be used when this property is not nil.
Declaration
Objective-C
@property (nonatomic, nullable) PSPDFRenderDrawBlock drawBlock;
Swift
var drawBlock: PDFRenderDrawBlock? { 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 ofCIFilter
with different input parameters without customizing itsname
.RenderOptions
are equality checked during cache lookup. Using the standard implementation ofCIFilter
can cause overhead to the point of making PSPDFKit unusable and is therefore substituted with a merename
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 tofalse
.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 }
-
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;