Implements

Constructors

  • Create a PrintMgr instance. Instead of creating an instance in new mode, use create to create an instance.

    Parameters

    • options: Options

      Create a PrintMgr instance with the specified options.

    Returns PrintMgr

    const printMgr = await PrintMgr.create();
    

Properties

options: Options

Methods

  • Destroy the current object.

    Returns Promise<void>

    A promise that resolves when the object is destroyed.

  • do modal

    Returns Promise<void>

    A promise that resolves when the modal operation is completed.

  • enum printer name

    Returns Promise<string[]>

    A promise that resolves to the array of printer names.

  • get default print printer name

    Returns Promise<string>

    A promise that resolves to the default print printer name.

  • Get the print auto center.

    Returns Promise<boolean>

    A promise that resolves to whether to auto center.

  • Get the print copies.

    Returns Promise<number>

    A promise that resolves to the number of copies.

  • get print page array

    Returns Promise<number[]>

    A promise that resolves to the print page array.

  • get print reverse

    Returns Promise<boolean>

    A promise that resolves to whether the print reverse is set.

  • get print range mode

    Returns Promise<number>

    A promise that resolves to the print range mode.

  • set default print printer by name

    Parameters

    • printerName: string

      printer name

    Returns Promise<void>

    A promise that resolves when the default print printer is set.

  • set print as image

    Parameters

    • printAsImage: boolean = false

      whether to set print as image, default is false

    Returns Promise<void>

    A promise that resolves when the print as image is set.

  • Set the print auto center.

    Parameters

    • autoCenter: boolean

      Whether to auto center.

    Returns Promise<void>

    A promise that resolves when the print auto center is set.

  • Set the print auto rotate.

    Parameters

    • autoRotate: boolean

      Whether to auto rotate.

    Returns Promise<void>

    A promise that resolves when the print auto rotate is set.

  • Set the print copies. Displayed as the number of print copies in the UI.

    Parameters

    • copies: number

      The number of copies, must be greater than 0 and less than or equal to 10000.

    Returns Promise<void>

    A promise that resolves when the print copies is set.

  • set print page array

    Parameters

    • pageArray: number[]

      page array

    Returns Promise<void>

    A promise that resolves when the print page array is set.

  • set print paper size by page

    Parameters

    • paperSizeByPage: boolean = false

      whether to set paper size by page, default is false

    Returns Promise<void>

    A promise that resolves when the print paper size by page is set.

  • set print preview

    Parameters

    • preview: boolean = false

      whether to set print preview, default is false

    Returns Promise<void>

    A promise that resolves when the print preview is set.

  • set print reverse

    Parameters

    • reverse: boolean = false

      whether to set reverse, default is false

    Returns Promise<void>

    A promise that resolves when the print reverse is set.

  • set progress display

    Parameters

    • show: boolean = true

      whether to set progress display, default is true

    Returns Promise<void>

    A promise that resolves when the progress display is set.

  • set simulate overprinting

    Parameters

    • simulateOverPrinting: boolean = false

      whether to set simulate overprinting, default is false

    Returns Promise<void>

    A promise that resolves when the simulate overprinting is set.

  • Create a PrintMgr instance.

    Parameters

    • options: Options

      Create a PrintMgr instance with the specified options.

    Returns Promise<PrintMgrType>

    A promise that resolves to the created PrintMgr instance.

    const printMgr = await PrintMgr.create();