[]
        
(Showing Draft Content)

IPdfDocumentOptions 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 displayTitle

displayTitle: boolean

Specifies whether the window's title bar should display the document title taken from IPdfDocumentInfo.title. If false, the name of the PDF file should be displayed.

The default value is false.

Optional ended

ended: Object

Occurs when the document has been rendered.

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 lang

lang: string

Represents the default natural language of the document.

The language code is a 2-character ISO 639 language code (e.g. "en" for English or "ja" for Japanese) followed by an optional 2-character ISO 3166 country code (e.g. "US" for the United States or "JP" for Japan). For example: "en", "en-US", "ja-JP".

The default value is undefined which means that the document does not have the default natural language.

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 tagged

tagged: boolean

Indicates that the document conforms to Tagged PDF conventions. For a document to be recognized as a Tagged PDF document this value must be true.

The default value is false.

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.