Implements

Constructors

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

    Parameters

    • Optionaloptions: Options

      Create a PDFObject instance with the specified options.

    Returns PDFObject

    const pdObject = await PDFObject.create();
    

Properties

options: Options

Methods

  • Destroys the pdfObject.

    Returns Promise<void>

    A promise that resolves when the object is destroyed.

  • Retrieves the constant string of the object.

    Parameters

    • Optionalobj: PDFObjectType

      The object from which to retrieve the constant string.

    Returns Promise<string>

    A promise that resolves to the constant string of the object.

  • Retrieves the direct type of the object.

    Returns Promise<number>

    A promise that resolves to a number representing the direct type of the object.

  • Retrieves the integer value of the object.

    Returns Promise<number>

    A promise that resolves to the integer value of the object.

  • Retrieves the numeric value of the object.

    Returns Promise<number>

    A promise that resolves to the numeric value of the object.

  • Retrieves the object number.

    Returns Promise<number>

    A promise that resolves to a number representing the object's number.

  • Retrieves the string representation of the object.

    Returns Promise<string>

    A promise that resolves to a string representing the object.

  • Retrieves the Unicode text of the object.

    Returns Promise<string>

    A promise that resolves to the Unicode text of the object.

  • Determines if the current object is identical to another object.

    Parameters

    • otherObj: PDFObjectType

      Another PDFObject instance to compare with.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating whether the two objects are identical.

  • Determines if the object has been modified.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating whether the object has been modified.

  • Sets whether the object has been modified.

    Parameters

    • Optionalmodified: boolean = false

      Whether the object has been modified. Defaults to false.

    Returns Promise<void>

    A promise that resolves when the modification status is set.

  • Sets the Unicode text to the object.

    Parameters

    • str: string

      The string to set.

    Returns Promise<void>

    A promise that resolves when the text is set.

  • Creates a PDFObject instance.

    Parameters

    • Optionaloptions: Options

      The configuration options required for creation, containing necessary initialization information.

    Returns Promise<PDFObjectType>

    A promise that resolves to a PDFObject instance.