5.20203.748
wijmo.pdf Interface IPdfDocumentOptions Wijmo API Interface

IPdfDocumentOptions Interface

Represents the PdfDocument initialization settings.

Heirarchy

  • IPdfDocumentOptions

Properties

Optional bufferPages

bufferPages: boolean

Indicates whether the pages buffering mode is enabled which means that the document's pages can be iterated over using PdfDocument.pageIndex and PdfDocument.bufferedPageRange.

This property can be set to false only if both header and footer are invisible.

The default value is true.

Optional compress

compress: boolean

Indicates whether the document compression is enabled.

The default value is true.

Optional ended

ended: Object

Occurs when the document has been rendered.

Optional footer

Represents the initialization settings of a footer, the page area positioned right above the bottom margin.

Optional header

Represents the initialization settings of a header, the page area positioned right below the top margin.

Optional info

Represents the document information, such as author name, document's creation date and so on.

Optional lineGap

lineGap: number

Represents the spacing between each line of text, in points.

The default value is 0.

Optional ownerPassword

ownerPassword: string

Represents the PDF owner password.

When only owner password is provided, users are able to decrypt and open the document without providing any password, but the access is limited to those operations explicitly permitted according to permissions settings. Users with owner password have full access to the document.

When both owner password and userPassword are provided, users with user password are able to decrypt the file but only have limited access to the file according to permissions settings. Users with owner password have full access to the document.

The wijmo.pdf.security module must be added on page to use PDF encryption and permissions settings.

Optional pageAdded

pageAdded: Object

Occurs when a new page is added to the document.

Optional pageSettings

pageSettings: IPdfPageSettings

Represents the default page settings for the pages added automatically and for the PdfDocument.addPage method.

Optional permissions

permissions: IPdfPermissions

Represents PDF file permissions.

To set permissons for the PDF file, you need to provide an ownerPassword along with the permissions settings. By default, all operations are disallowed. You need to explicitly allow certain operations.

The wijmo.pdf.security module must be added on page to use PDF encryption and permissions settings.

Optional userPassword

userPassword: string

Represents the PDF user password.

When only user password is provided, users with user password are able to decrypt the file and have full access to the document.

When both user password and ownerPassword are provided, users with user password are able to decrypt the file but only have limited access to the file according to permissions settings. Users with owner password have full access to the document.

The wijmo.pdf.security module must be added on page to use PDF encryption and permissions settings.

Optional version

version: PdfVersion

Represents PDF file version.

The PDF file version determines encryption algorithm and key length to use:

When using PDF version 1.7 ExtensionLevel 3, password is truncated to 127 bytes of its UTF-8 representation. In older versions, password is truncated to 32 bytes, and only Latin-1 characters are allowed.

The default value is PdfVersion.v1_3.