Implements

Constructors

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

    Parameters

    • Optionaloptions: PDFNumberOptions

      Create a PDFNumber instance with the specified options.

    Returns PDFNumber

    const pdfNumber = await PDFNumber.create({
    int: 1
    });
    // or
    const pdfNumber = await PDFNumber.create({
    float: 1.1
    });
    // or
    const pdfNumber = await PDFNumber.create({
    str: '1'
    });

Properties

Methods

  • Destroys the PDFNumber object.

    Returns Promise<void>

    A promise that resolves when the object is destroyed.

  • Retrieves the float value of the PDFNumber object.

    Returns Promise<number>

    A promise that resolves to the float value of the PDFNumber.

  • Retrieves the integer value of the PDFNumber object.

    Returns Promise<number>

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

  • Retrieves the numeric value of the PDFNumber object.

    Returns Promise<number>

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

  • Retrieves the string representation of the PDFNumber object.

    Returns Promise<string>

    A promise that resolves to the string representation of the PDFNumber.

  • Checks if two PDFNumber instances are equal.

    Parameters

    • otherNumber: PDFNumberType

      The second PDFNumber instance to compare.

    Returns Promise<boolean>

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

  • Determines if the PDFNumber object is an integer.

    Returns Promise<boolean>

    A promise that resolves to true if the PDFNumber is an integer; otherwise, false.

  • Sets the numeric value of the PDFNumber object.

    Parameters

    • value: number

      The value to set.

    Returns Promise<void>

    A promise that resolves when the value is set.

  • Sets the string representation of the PDFNumber object.

    Parameters

    • str: string

      The string to set.

    Returns Promise<void>

    A promise that resolves when the string is set.