Options
All
  • Public
  • Public/Protected
  • All
Menu

It handles WebSocket communication with the JSPrintManager Client App.

Hierarchy

  • JSPrintManager

Index

Properties

Static WS

Static _ses_cert

_ses_cert: string = ""

Static auto_reconnect

auto_reconnect: boolean = false

If the websocket have closed, then retry to reconnect automatically

Accessors

Static license_url

license_url:

Gets or sets the URL to request the license info from.

Static session_certificate

session_certificate:

Static websocket_status

websocket_status:

Gets the status of the WebSocket connection.

Methods

Static getPrinters

  • getPrinters(): Promise<Object>
  • Gets the list of installed printers in the client system.

    Returns Promise<Object>

Static getPrintersInfo

  • getPrintersInfo(detail_level?: PrintersInfoLevel, printer_name?: string): Promise<Object>
  • Gets detailed info of each installed printer in the client system.

    Parameters

    • Default value detail_level: PrintersInfoLevel = JSPM.PrintersInfoLevel.Basic
    • Default value printer_name: string = ""

    Returns Promise<Object>

Static getScanners

  • getScanners(): Promise<any>
  • Returns the list of scanner devices available in the client system.

    Returns Promise<any>

Static getSerialPorts

  • getSerialPorts(): Promise<any>
  • Returns the list of Serial ports available in the client system.

    Returns Promise<any>

Static getSystemFonts

  • getSystemFonts(): Promise<any>
  • Returns the list of fonts name available in the client system.

    Returns Promise<any>

Static onPrinterCreated

  • onPrinterCreated(callback: any, error: any, detail_level?: PrintersInfoLevel): string
  • Occurs when a new printer is created in the client system.

    Parameters

    • callback: any

      The callback function

    • error: any

      The error function

    • Default value detail_level: PrintersInfoLevel = JSPM.PrintersInfoLevel.Extended

      The printers info details level

    Returns string

Static onPrinterDeleted

  • onPrinterDeleted(callback: any, error: any, detail_level?: PrintersInfoLevel): string
  • Occurs when any printer is deleted from the client system.

    Parameters

    • callback: any

      The callback function

    • error: any

      The error function

    • Default value detail_level: PrintersInfoLevel = JSPM.PrintersInfoLevel.Extended

      The printers info details level

    Returns string

Static onPrinterUpdated

  • onPrinterUpdated(callback: any, error: any, detail_level?: PrintersInfoLevel): string
  • Occurs when any printer is updated in the client system.

    Parameters

    • callback: any

      The callback function

    • error: any

      The error function

    • Default value detail_level: PrintersInfoLevel = JSPM.PrintersInfoLevel.Extended

      The printers info details level

    Returns string

Static showAbout

  • showAbout(): Promise<any>
  • Displays the About dialog of the JSPrintManager Client App.

    Returns Promise<any>

Static start

  • start(secure?: boolean, host?: string, port?: number): Promise<void>
  • Starts a WebSocket communication with the JSPrintManager Client App.

    Parameters

    • Default value secure: boolean = true

      True to use WebSocket Secure (wss://); otherwise false.

    • Default value host: string = "localhost"
    • Default value port: number = 23443

      The local network port number.

    Returns Promise<void>

Static stop

  • stop(): void
  • Closes the WebSocket connection.

    Returns void

Static unsubscribePrinterEvent

  • unsubscribePrinterEvent(id: any): Promise<Object>
  • Unsubscribes a given event ID

    Parameters

    • id: any

      The event ID

    Returns Promise<Object>

Static updateClient

  • updateClient(): Promise<any>
  • Performs the update process of the JSPrintManager Client App.

    Returns Promise<any>