V1
PDF ActiveReportsJS API Module

PDF Module

Type aliases

CheckCancelCallback

CheckCancelCallback: function

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

Type declaration

    • (): boolean
    • Returns boolean

DocumentSecurity

DocumentSecurity: object

Defines document security settings.

Type declaration

  • Optional ownerPassword?: undefined | string

    Protects a document from printing or modifying, see Permissions.

  • Optional permissions?: Permissions

    The document permissions.

  • Optional 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.

Type declaration

    • (pageNumber: number): void
    • Parameters

      • pageNumber: number

      Returns void

PdfExportResult

PdfExportResult: object

Export result.

Type declaration

  • data: Blob

    Result content.

  • download: function

    Triggers browser download of file with export result.

      • (filename?: undefined | string): void
      • Parameters

        • Optional filename: undefined | string

        Returns void

PdfFontDescriptor

PdfFontDescriptor: object

Defines descriptor of font.

Type declaration

  • name: string

    Font name.

  • Optional postscriptName?: undefined | string

    The font postscript name.

  • source: string | string[]

    The source of the font.

  • Optional style?: undefined | string

    The font style.

  • Optional useAsDefault?: undefined | false | true

    True - to use the font as default font.

  • Optional weight?: undefined | string

    The font weight.

PdfSettings

PdfSettings: object

Defines PDF export settings.

Type declaration

  • Optional autoPrint?: undefined | false | true

    Prints a document on opening the file.

  • Optional fonts?: PdfFontDescriptor[]

    Available *.ttf font files.

  • Optional info?: PdfSettingsInfo

    Document metadata.

  • Optional pdfVersion?: PdfVersion

    PDF Version.

  • Optional security?: DocumentSecurity

    Document security settings.

PdfSettingsInfo

PdfSettingsInfo: object

Defines PDF metadata.

Type declaration

  • Optional author?: undefined | string

    Author

  • Optional keywords?: undefined | string

    keywords

  • Optional subject?: undefined | string

    Subject

  • Optional 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.

Type declaration

  • Optional annotating?: undefined | false | true

    Allows annotating.

  • Optional contentAccessibility?: undefined | false | true

    Enables content accessibility.

  • Optional copying?: undefined | false | true

    Allows copying.

  • Optional documentAssembly?: undefined | false | true

    Allows document assembly.

  • Optional modifying?: undefined | false | true

    Allows modifying.

  • Optional printing?: "lowResolution" | "highResolution" | "none"

    Allows printing.

Variables

Const registerPdfFont

registerPdfFont: function

Registers .*ttf fonts to be used in PDF.

param

Type declaration

Functions

exportDocument

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

    Parameters

    • source: PageDocument | VDomRenderer

      PageDocument to export.

    • Optional settings: PdfSettings

      Export settings.

    • Optional onProgress: OnProgressCallback

      The callback that gets called after each sheet is rendered.

    • Optional checkCancel: CheckCancelCallback

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

    Returns Promise<PdfExportResult>