Implements

Constructors

  • Create a PDFDictionary instance. Instead of creating an instance in new mode, use create to create an instance.

    Parameters

    • Optionaloptions: Options

      Create a PDFDictionary instance with the specified options.

    Returns PDFDictionary

    const pdfDictionary = await PDFDictionary.create();
    

Properties

options: Options

Methods

  • Add a reference object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • doc: DocType

      The input document object.

    • objNum: number

      The referred object number for the reference object.

    Returns Promise<void>

  • Get an array object specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<null | PDFArrayType>

    Return an array object specified by key.

  • Get the boolean value for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • defaultBool: boolean = false

      The default boolean value. Default is false.

    Returns Promise<boolean>

    Return the boolean value for the element specified by key.

  • Get the number of elements in the dictionary.

    Returns Promise<number>

    Return the number of elements in the dictionary.

  • Get reference to element. Returns direct reference to the element.

    Parameters

    • key: string

      The input key string.

    Returns Promise<null | PDFObjectType>

    Return the element at the specified key in the PDFDictionary instance.

  • Get float value.

    Parameters

    • key: string

      The input key string.

    Returns Promise<number>

    Return the float value for the element specified by key.

  • Get the integer value for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • defaultInt: number

      The default integer value.

    Returns Promise<number>

    Return the integer value for the element specified by key.

  • Get the 64-bit integer value for the element specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<number>

    Return the 64-bit integer value for the element specified by key.

  • Get the matrix value for the element specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<Matrix>

    Return the matrix value for the element specified by key.

  • Get the name object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<null | PDFObjectType>

    Return the name object for the element specified by key.

  • Get the number value for the element specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<number>

    Return the number value for the element specified by key.

  • Get the rectangle value for the element specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<Rect>

    Return the rectangle value for the element specified by key.

  • Get the string object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<string>

    Return the string object for the element specified by key.

  • Get the unicode text for the element specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<string>

    Return the unicode text for the element specified by key.

  • Check if the key exists in the dictionary.

    Parameters

    • key: string

      The input key string.

    Returns Promise<boolean>

    Return true if the key exists in the dictionary, otherwise return false.

  • Remove the element specified by key.

    Parameters

    • key: string

      The input key string.

    Returns Promise<void>

  • Replace the key of the element specified by key with new key string.

    Parameters

    • oldKey: string

      The old key string.

    • newKey: string

      The new key string.

    Returns Promise<void>

  • Setting element data.

    Parameters

    • key: string

      The input key string.

    • obj: PDFObjectType

      The input element data.,type is PDFObjectType。

    • doc: DocType

      The input document object.

    Returns Promise<void>

  • Set a boolean value of boolean object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • bool: boolean

      The boolean value.

    Returns Promise<void>

  • Set a 32-bit integer of number object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • num: number

      The number value.

    Returns Promise<void>

  • Set a matrix object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • matrix: Matrix

      The input matrix object.

    Returns Promise<void>

  • Set a string of name object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • name: string

      The name string.

    Returns Promise<void>

  • Set a number object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • num: number

      The number value.

    Returns Promise<void>

  • Set a rectangle for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • rect: Rect

      The input rectangle object.

    Returns Promise<void>

  • Set a reference object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • doc: DocType

      The input document object.

    • obj: PDFObjectType

      The referred object for the reference object.

    Returns Promise<void>

  • Set a reference object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • doc: DocType

      The input document object.

    • objNum: number

      The referred object number for the reference object.

    Returns Promise<void>

  • Set a string of string object for the element specified by key.

    Parameters

    • key: string

      The input key string.

    • str: string

      The string value.

    Returns Promise<void>