AboutSupportDeveloper GuideVersion 38.126.82.61

Options for printing a webpage in OpenFin.

interface PrintOptions {
    collate?: boolean;
    color?: boolean;
    content?: "self";
    copies?: number;
    deviceName?: string;
    dpi?: Dpi;
    duplexMode?: "simplex" | "shortEdge" | "longEdge";
    landscape?: boolean;
    margins?: Margins;
    pageRanges?: Record<"from" | "to", number>[];
    pagesPerSheet?: number;
    printBackground?: boolean;
    scaleFactor?: number;
    silent?: boolean;
}

Properties

collate?: boolean

Collates the webpage before printing.

color?: boolean

Default Value

true

Prints in full color (greyscale otherwise).
content?: "self"
copies?: number

Number of copies to be printed.

deviceName?: string

Name of the printer device to use.

dpi?: Dpi

Dots per inch of the printed webpage.

duplexMode?: "simplex" | "shortEdge" | "longEdge"

Duplex mode of the printed webpage.

landscape?: boolean

Default Value

true

Prints in landscape mode (portrait otherwise).
margins?: Margins

Margins for printed webpage.

pageRanges?: Record<"from" | "to", number>[]

Page range to print.

pagesPerSheet?: number

Number of webpage pages to print per printer sheet.

printBackground?: boolean

Default Value

false

Includes the webpage background color and image when printing.
scaleFactor?: number

Scale factor of the printer webpage.

silent?: boolean

Default Value

false

Disables prompting the user for print settings.