PDF ActiveReportsJS API Module

PDF 模块

类型别名

CheckCancelCallback

CheckCancelCallback: function

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

类型声明

    • (): boolean
    • 返回值 boolean

DocumentSecurity

DocumentSecurity: object

Defines document security settings.

类型声明

  • 可选 ownerPassword?: undefined | string

    Protects a document from printing or modifying, see Permissions.

  • 可选 permissions?: Permissions

    The document permissions.

  • 可选 userPassword?: undefined | string

    Encrypts a document with a password.

OnProgressCallback

OnProgressCallback: function

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

类型声明

    • (pageNumber: number): void
    • 参数

      • pageNumber: number

      返回值 void

PdfExportResult

PdfExportResult: object

Export result.

类型声明

  • data: Blob

    Result content.

  • download: function

    Triggers browser download of file with export result.

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

        • 可选 filename: undefined | string

        返回值 void

PdfFontDescriptor

PdfFontDescriptor: object

Defines descriptor of font.

类型声明

  • name: string

    Font name.

  • 可选 postscriptName?: undefined | string

    The font postscript name.

  • source: string | string[]

    The source of the font.

  • 可选 style?: undefined | string

    The font style.

  • 可选 useAsDefault?: undefined | false | true

    True - to use the font as default font.

  • 可选 weight?: undefined | string

    The font weight.

PdfSettings

PdfSettings: object

Defines PDF export settings.

类型声明

  • 可选 autoPrint?: undefined | false | true

    Prints a document on opening the file.

  • 可选 fonts?: PdfFontDescriptor[]

    Available *.ttf font files.

  • 可选 info?: PdfSettingsInfo

    Document metadata.

  • 可选 pdfVersion?: PdfVersion

    PDF Version.

  • 可选 security?: DocumentSecurity

    Document security settings.

PdfSettingsInfo

PdfSettingsInfo: object

Defines PDF metadata.

类型声明

  • 可选 author?: undefined | string

    Author

  • 可选 keywords?: undefined | string

    keywords

  • 可选 subject?: undefined | string

    Subject

  • 可选 title?: undefined | string

    Title

PdfVersion

PdfVersion: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.7ext3"

The version of PDF specification.

Permissions

Permissions: object

Defines PDF permissions.

类型声明

  • 可选 annotating?: undefined | false | true

    Allows annotating.

  • 可选 contentAccessibility?: undefined | false | true

    Enables content accessibility.

  • 可选 copying?: undefined | false | true

    Allows copying.

  • 可选 documentAssembly?: undefined | false | true

    Allows document assembly.

  • 可选 modifying?: undefined | false | true

    Allows modifying.

  • 可选 printing?: "lowResolution" | "highResolution" | "none"

    Allows printing.

变量

常量 registerPdfFont

registerPdfFont: function

Registers .*ttf fonts to be used in PDF.

param

类型声明

方法

exportDocument

  • Exports a provided PageDocument to the PDF format and returns it as Data URI or Blob.

    参数

    • source: PageDocument | VDomRenderer

      PageDocument to export.

    • 可选 settings: PdfSettings

      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<PdfExportResult>