HTML ActiveReportsJS API Module

HTML 模块

类型别名

CheckCancelCallback

CheckCancelCallback: function

Defines a type of callback that gets called to check if cancellation was requested.

类型声明

    • (): boolean
    • 返回值 boolean

HtmlExportResult

HtmlExportResult: object

Export result.

类型声明

  • data: Blob | string

    Result content. The content is 'string' if 'multiPage = true', otherwise content is zip blob.

  • download: function

    Triggers browser download of file with export result.

      • (filename?: undefined | string): void
      • 参数

        • 可选 filename: undefined | string

        返回值 void

HtmlSettings

HtmlSettings: object

Defines HTML export settings.

类型声明

  • 可选 autoPrint?: undefined | false | true

    Set to true to add script for a printing page when it is loaded.

  • 可选 multiPage?: undefined | false | true

    Set to true to export as a ZIP archive with pages, set to false to export all report pages as a single HTML page.

  • 可选 title?: undefined | string

    A title for an HTML page.

OnProgressCallback

OnProgressCallback: function

Defines a type of callback that gets called after each page is rendered.

类型声明

    • (pageNumber: number): void
    • 参数

      • pageNumber: number

      返回值 void

方法

exportDocument

  • Exports a provided PageDocument to the HTML format and returns it as string or Blob.

    参数

    • source: PageDocument | VDomRenderer

      PageDocument to export.

    • 可选 settings: HtmlSettings

      Export settings.

    • 可选 onProgress: OnProgressCallback

      The callback that gets called after each sheet is rendered.

    • 可选 checkCancel: CheckCancelCallback

      The callback that gets called before sheet rendering, the rendering process will be canceled if the function returns true.

    返回值 Promise<HtmlExportResult>