docx
    Preparing search index...

    Type Alias IImageWatermarkOptions

    Options for creating an image watermark.

    type IImageWatermarkOptions = {
        data: Buffer | string | Uint8Array | ArrayBuffer;
        title?: string;
        transformation: { height: number; width: number };
        type: "jpg" | "png" | "gif" | "bmp";
        washout?: boolean;
    }
    Index
    data: Buffer | string | Uint8Array | ArrayBuffer

    The image data. Accepts a Buffer, Uint8Array, ArrayBuffer, or a base64-encoded data URI string.

    title?: string

    Title of the image, shown by Word as the picture's name.

    transformation: { height: number; width: number }

    Size at which the image is drawn, in pixels, matching ImageRun. The image is centred on the page.

    Type Declaration

    • Readonlyheight: number

      Display height in pixels.

    • Readonlywidth: number

      Display width in pixels.

    type: "jpg" | "png" | "gif" | "bmp"

    The image format. VML pictures do not support SVG.

    washout?: boolean

    Whether the image is lightened so that text remains readable over it. Default is true, matching Word's "Washout" option.