[]
        
(Showing Draft Content)

PdfExport

Namespace: PdfExport

Table of contents

유형별칭

함수

Type aliases

CheckCancelCallback

Ƭ CheckCancelCallback: () => boolean

Type declaration

▸ (): boolean

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

Returns

boolean


DocumentSecurity

Ƭ DocumentSecurity: Object

Defines document security settings.

Type declaration

Name Type Description
ownerPassword? string Protects a document from printing or modifying, see Permissions.
permissions? Permissions The document permissions.
userPassword? string Encrypts a document with a password.

OnProgressCallback

Ƭ OnProgressCallback: (pageNumber: number) => void

Type declaration

▸ (pageNumber): void

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

Parameters
Name Type
pageNumber number
Returns

void


PdfExportResult

Ƭ PdfExportResult: Object

Export result.

Type declaration

Name Type Description
data Blob Result content.
download (filename?: string) => void Triggers browser download of file with export result.

PdfFontDescriptor

Ƭ PdfFontDescriptor: Object

Defines descriptor of font.

Type declaration

Name Type Description
name string Font name.
postscriptName? string The font postscript name.
source string | string[] The source of the font.
style? string The font style.
useAsDefault? boolean True - to use the font as default font.
weight? string The font weight.

PdfSettings

Ƭ PdfSettings: Object

Defines PDF export settings.

Type declaration

Name Type Description
autoPrint? boolean 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.

Type declaration

Name Type Description
author? string Author
keywords? string keywords
subject? string Subject
title? string Title

PdfVersion

Ƭ PdfVersion: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.7ext3" | "PDF/A-2b" | "PDF/A-3b"

The version of PDF specification.


Permissions

Ƭ Permissions: Object

Defines PDF permissions.

Type declaration

Name Type Description
annotating? boolean Allows annotating.
contentAccessibility? boolean Enables content accessibility.
copying? boolean Allows copying.
documentAssembly? boolean Allows document assembly.
modifying? boolean Allows modifying.
printing? "lowResolution" | "highResolution" | "none" Allows printing.

Functions

exportDocument

exportDocument(source, settings?, onProgress?, checkCancel?): Promise<PdfExportResult>

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

Parameters

Name Type Description
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.

Returns

Promise<PdfExportResult>


registerPdfFont

registerPdfFont(fontDescriptor): void

deprecated Use FontStore.registerFonts instead.

Registers .*ttf fonts to be used in PDF.

Parameters

Name Type
fontDescriptor PdfFontDescriptor

Returns

void