Options
All
  • Public
  • Public/Protected
  • All
Menu

Specifies information about the print job to be processed at the client side.

Hierarchy

Index

Properties

_type

_type: string = ""

Accessors

binaryPrinterCommands

binaryPrinterCommands:

Gets or sets the printer's commands in binary format. Default is null (nothing).

clientPrinter

clientPrinter:

Gets or sets the ClientPrinter object. Default is null (nothing).

Use a DefaultPrinter object for using the default printer installed in the client machine.

Use a InstalledPrinter object for using a printer installed in the client machine with an associated OS printer driver.

Use a ParallelPortPrinter object for using a printer which is connected through a parallel port in the client machine.

Use a SerialPortPrinter object for using a printer which is connected through a serial port in the client machine.

Use a NetworkPrinter object for using a Network IP/Ethernet printer which can be reached from the client machine.

files

files:

Gets an array of PrintFile objects to be printed at the client side. Default is an empty list.

printerCommands

printerCommands:

Gets or sets the printer's commands in text plain format. Default is an empty string.

printerCommandsCodePage

printerCommandsCodePage:

Gets or sets the Encoding or CodePage to apply on the printerCommands property. It requires SheetJS (https://github.com/SheetJS/js-codepage). Refer to JSPM.Encoding enum.

printerCommandsCopies

printerCommandsCopies:

Gets or sets the number of copies for Printer Commands. Default is 1.

Methods

_cmd2bin

  • _cmd2bin(): void
  • Returns void

_genPCArrayAsync

  • _genPCArrayAsync(binPrinterCommands: Uint8Array, printerCopies: number): Promise<Blob>
  • Parameters

    • binPrinterCommands: Uint8Array
    • printerCopies: number

    Returns Promise<Blob>

_genPFGArrayAsync

  • _genPFGArrayAsync(printFileGroup: PrintFile[]): Promise<Blob>
  • Parameters

    Returns Promise<Blob>

_genPrinterArrayAsync

  • _genPrinterArrayAsync(clientPrinter: IClientPrinter): Promise<Uint8Array>
  • Parameters

    Returns Promise<Uint8Array>

_generateDataAsync

  • _generateDataAsync(): Promise<Blob>
  • Returns Promise<Blob>

onError

  • onError(data: any, is_critical: any): void
  • Occurs when an error is thrown for the current print job.

    Parameters

    • data: any

      The data object related to this event.

    • is_critical: any

      Whether the error is critial or not.

    Returns void

onFinished

  • onFinished(data: any): void
  • Occurs when the current print job has finished.

    Parameters

    • data: any

      The data object related to this event.

    Returns void

onUpdate

  • onUpdate(data: any, last: any): void
  • Parameters

    • data: any
    • last: any

    Returns void

onUpdated

  • onUpdated(data: any): void
  • Occurs when the current print job is updated.

    Parameters

    • data: any

      The data object related to this event.

    Returns void

sendToClient

  • sendToClient(): Promise<Object>