DsPdfJS API - v9.1.0
    Preparing search index...

    Type Alias RedactOptions

    Represents additional options to use when a document is being redacted.

    type RedactOptions = {
        copyImagesOnRedact?: boolean;
        ignoreUnreadableObjects?: boolean;
        precision?: number;
        renderOptions?: {
            allowFontSbits?: boolean;
            backColor?: Color;
            interpolationMode?: InterpolationMode;
            useGlyphBitmapCache?: boolean;
            useRenderingCache?: boolean;
            zoom?: number;
        };
    }
    Index

    Properties

    copyImagesOnRedact?: boolean

    Indicates whether images within the redacted area that also appear in other locations will be copied before applying the redact. If this property is true, only the appearance of the redacted area will be affected. If this property is false, if an image within the redacted area also appears in other locations, all these locations will be affected. The default is false.

    ignoreUnreadableObjects?: boolean

    Indicates whether to completely remove objects that need to be partially redacted but which are unreadable or unknown to DsPdfJS.

    If true (the default), such objects will be silently removed. Otherwise an exception will be thrown.

    precision?: number

    The maximum distance (in points) between a PDF object's boundary that is outside a redact area, and the redact area's edge, at which the object is still considered to be inside the redact.

    The default value is 2 points.

    renderOptions?: {
        allowFontSbits?: boolean;
        backColor?: Color;
        interpolationMode?: InterpolationMode;
        useGlyphBitmapCache?: boolean;
        useRenderingCache?: boolean;
        zoom?: number;
    }

    The additional options used when a redact action requires that some PDF content is rendered as an image.

    Type Declaration

    • OptionalallowFontSbits?: boolean

      Indicating whether bitmaps embedded in an OpenType font should be rendered. The default is true. This property is ignored if either 'UseRenderingCache' or 'UseGlyphBitmapCache' is false.

    • OptionalbackColor?: Color

      The background color. The default is "White".

    • OptionalinterpolationMode?: InterpolationMode

      The sampling mode to use when drawing images with resizing. Default is "NearestNeighbor".

    • OptionaluseGlyphBitmapCache?: boolean

      Indicates whether glyphs are cached as bitmaps rather than as glyph paths. The default is true. This property is ignored if 'UseRenderingCache' is false.

    • OptionaluseRenderingCache?: boolean

      Indicates whether to use the rendering cache.

      This property is true by default. Setting this property to false reduces memory consumption, at the cost of slower rendering speed.

    • Optionalzoom?: number

      The zoom factor. The default is 1.