Implements

Constructors

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

    Parameters

    • Optionaloptions: Options

      Create a PDFString instance with the specified options.

    Returns PDFString

    const pdfStr = await PDFString.create({
    str: 'Hello World'
    });

Properties

options: Options

Methods

  • Destroys the PDFString object.

    Returns Promise<void>

    A promise that resolves when the object is destroyed.

  • Retrieves the string representation.

    Returns Promise<string>

    A promise that resolves to a string representing the object.

  • Determines if two string objects are identical.

    Parameters

    Returns Promise<boolean>

    A promise that resolves to true if the two objects are identical; otherwise, false.

  • Determines if the object is hexadecimal.

    Returns Promise<boolean>

    A promise that resolves to true if the object is hexadecimal; otherwise, false.

  • Sets the hexadecimal representation of the object.

    Parameters

    • OptionalisHex: boolean = true

      Whether to set the string representation as hexadecimal (optional, defaults to true).

    Returns Promise<void>

    A promise that resolves when the hexadecimal representation is set.

  • Creates a string object from a byte string.

    Parameters

    • Optionaloptions: Options

      str - The string value to be used to create the string object.
      isHex - A boolean value that specifies whether the string is in hexadecimal format (optional, default = true).

    Returns Promise<PDFStringType>

    • A promise that resolves with a new PDFString object.