PdfWebWorker Class
File
wijmo.grid.pdf.js
Module
wijmo.grid.pdf

Represents server-side methods for exporting FlexGrid to PDF/generating PDF, for use with Web Worker.

Methods

Static deserializeGrid

deserializeGrid(data: ArrayBuffer, settings?: IFlexGridDrawSettings): any

Deserializes the FlexGrid from ArrayBuffer to its internal representation that can be used in a Web Worker and passed to the draw and drawToPosition methods.

Parameters
  • data: ArrayBuffer

    The data to deserialize.

  • settings: IFlexGridDrawSettings Optional

    The draw settings used to deserialize the grid.

Returns
any

Static initExport

initExport(draw: PdfDocument, clientData?: IClientData)): void

Performs the PDF document generation started in a UI thread by calling the export method.

Parameters
  • draw: (doc: wijmo.pdf.PdfDocument

    The callback function to draw PDF. The function takes two parameters:

    • doc: An instance of the wijmo.pdf.PdfDocument class.
    • clientData: A dictionary of {name: value} pairs that contains the data added on the client side.

  • clientData: IClientData) Optional
Returns
void

Static initExportGrid

initExportGrid(): void

Performs the export started in a UI thread by calling the exportGrid method.

Returns
void

Static sendExportProgress

sendExportProgress(value: number): void

Sends the progress value to a client, where it will be handled by the export's progress callback function. Should be used in conjunction with the export method to inform client about the progress of the export.

Parameters
  • value: number

    The progress value, in the range of [0.0..1.0].

Returns
void