Implements

Constructors

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

    Parameters

    • Optionaloptions: Options

      Create a PDFArray instance with the specified options.

    Returns PDFArray

    const pdfArr = await PDFArray.create();
    

Properties

options?: Options

Methods

  • Add an integer to the PDFArray instance.

    Parameters

    • value: number

      The integer to be added.

    Returns Promise<void>

  • Add a name object.

    Parameters

    • name: string = ''

      The name to be added.

    Returns Promise<void>

  • Add a number to the PDFArray instance.

    Parameters

    • num: number

      The number to be added.

    Returns Promise<void>

  • Add a reference object with object number.

    Parameters

    • doc: DocType

      The document object.

    • objNum: number

      The referred object number.

    Returns Promise<void>

  • Add a string object.

    Parameters

    • str: string = ''

      The string to be added.

    Returns Promise<void>

  • Destroy the current object.

    Returns Promise<void>

  • Get an array object with specified position.

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<null | PDFObjectType>

    Return an array object with specified position.

  • Get the number of elements in the PDFArray instance.

    Returns Promise<number>

    Return the number of elements in the PDFArray instance.

  • Get a dictionary object with specified position.

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<null | PDFDictionaryType>

    Return a dictionary object with specified position.

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

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<null | PDFObjectType>

    Return the element at the specified index in the PDFArray instance.

  • Get direct or referred indirect object at the specified index in the PDFArray instance.

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<null | PDFObjectType>

    Returns direct or referred indirect object.

  • Get a floating-point with specified position.

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<number>

  • Get an integer with specified position.

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<number>

    Return an integer with specified position.

  • Get the matrix of the PDFArray instance.

    Returns Promise<Matrix>

    Return the matrix of the PDFArray instance.

  • Get a number with specified position.

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<number>

    Return a number with specified position.

  • Get the rectangle of the PDFArray instance.

    Returns Promise<Rect>

    Return the rectangle of the PDFArray instance.

  • Get a stream object with specified position.

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<null | PDFObjectType>

    Return a stream object with specified position.

  • Get the string with specified position.

    Parameters

    • index: number

      Specifies the zero-based index in the array.

    Returns Promise<string>

    Return the string with specified position.

  • Insert an element at specified position.

    Parameters

    • options: InsertAtType

      The options to insert an element at specified position.

    Returns Promise<void>

  • Release the FPDArray.

    Returns Promise<void>

  • Remove an element.

    Parameters

    • index: number

      The index of the element to be removed.

    Returns Promise<void>

  • Create a PDFArray instance.

    Parameters

    • Optionaloptions: Options

      Create a PDFArray instance with the specified options.

    Returns Promise<PDFArrayType>

    Return a PDFArray instance.