docx
    Preparing search index...

    Type Alias EmbeddedFileRunOptions

    Options for an EmbeddedFileRun.

    type EmbeddedFileRunOptions = {
        altText?: string;
        data: Buffer | string | Uint8Array | ArrayBuffer;
        displayAsIcon?: boolean;
        fileName: string;
        preview: EmbeddedFilePreview;
        transformation: { height: number; width: number };
    }
    Index
    altText?: string

    A description of the file for screen readers, as Word's "Alt Text"

    data: Buffer | string | Uint8Array | ArrayBuffer

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

    displayAsIcon?: boolean

    Whether the file is shown as an icon, as Word's "Display as icon" does, rather than as its content. When the file is changed in its application, Word draws its application's icon instead of its content. A packaged file is always shown as an icon. Default is false

    fileName: string

    The file's name, such as "budget.xlsx". Its extension says how the file is embedded: an Excel workbook (.xlsx, .xlsm), a Word document (.docx, .docm) or a PowerPoint presentation (.pptx, .pptm) as itself, which Word opens in Excel, Word or PowerPoint, and any other file, such as a sound, a video or a PDF, in an OLE package, which Word for Windows opens with the application the computer opens its type with. A packaged file keeps the name

    The picture the document shows for the file: of its content, such as a workbook's table, or an icon. Word draws it until the file is opened and changed in its application, which then draws the file again

    transformation: { height: number; width: number }

    The size the picture is drawn at, in pixels, at 96 to the inch, as an ImageRun's

    Type Declaration

    • Readonlyheight: number

      Height in pixels

    • Readonlywidth: number

      Width in pixels