Nutrient Web SDK
    Preparing search index...

    A line of text displayed at a specific bounding box in the PDF file.

    You can retrieve text lines using NutrientViewer.Instance#textLinesForPageIndex.

    Hierarchy

    • Record<
          {
              boundingBox: NutrientViewer.Geometry.Rect;
              contents: string;
              hints: Hints
              | null;
              id: number | null;
              pageIndex: number | null;
          },
          this,
      > & Readonly<
          {
              boundingBox: NutrientViewer.Geometry.Rect;
              contents: string;
              hints: Hints
              | null;
              id: number | null;
              pageIndex: number | null;
          },
      >
      • TextLine
    Index

    Properties

    Position of this text line on the page.

    contents: string

    Content of the text line.

    Text lines end with CRLF (\r\n).

    hints: Hints | null

    Hints for the text line.

    id: number | null

    An ID that is unique inside one page to reference the text line across the document.

    pageIndex: number | null

    The page index on which the text line is placed.

    pageIndex is zero-based and has a maximum value of totalPageCount - 1.

    displayName: string

    The name provided to Record(values, name) can be accessed with displayName.

    Methods

    • Returns IterableIterator<
          [
              keyof {
                  boundingBox: NutrientViewer.Geometry.Rect;
                  contents: string;
                  hints: Hints
                  | null;
                  id: number | null;
                  pageIndex: number | null;
              },
              | string
              | number
              | NutrientViewer.Geometry.Rect
              | VisualTextRange
              | Hints
              | SyntheticTextSelectionFontDescriptor
              | TextLineSyntheticTextSelectionRun[]
              | null,
          ],
      >

    • Returns this

      Map#asImmutable

    • Returns this

      Map#asMutable

    • Returns a new instance of this Record type with all values set to their default values.

      Returns this

    • Returns a new instance of this Record type with the value for the specific key set to its default value.

      Type Parameters

      • K extends keyof {
            boundingBox: NutrientViewer.Geometry.Rect;
            contents: string;
            hints: Hints | null;
            id: number | null;
            pageIndex: number | null;
        }

      Parameters

      • key: K

      Returns this

      remove

    • Parameters

      Returns this

      removeIn

    • Parameters

      • other: unknown

      Returns boolean

    • Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.

      If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.

      Type Parameters

      • K extends keyof {
            boundingBox: NutrientViewer.Geometry.Rect;
            contents: string;
            hints: Hints | null;
            id: number | null;
            pageIndex: number | null;
        }

      Parameters

      • key: K
      • OptionalnotSetValue: unknown

      Returns {
          boundingBox: NutrientViewer.Geometry.Rect;
          contents: string;
          hints: Hints | null;
          id: number | null;
          pageIndex: number | null;
      }[K]

    • Type Parameters

      • T

      Parameters

      • key: string
      • notSetValue: T

      Returns T

    • Parameters

      Returns unknown

    • Parameters

      • key: string

      Returns key is
          | "id"
          | "pageIndex"
          | "boundingBox"
          | "contents"
          | "visualTextRange"
          | "hints"
          | "syntheticTextSelectionFont"
          | "syntheticTextSelectionRuns"

    • Returns number

    • Parameters

      Returns boolean

    • Parameters

      • ...collections: (
            | Iterable<[string, unknown], any, any>
            | Partial<
                {
                    boundingBox: NutrientViewer.Geometry.Rect;
                    contents: string;
                    hints: Hints
                    | null;
                    id: number | null;
                    pageIndex: number | null;
                },
            >
        )[]

      Returns this

    • Parameters

      • ...collections: (
            | Iterable<[string, unknown], any, any>
            | Partial<
                {
                    boundingBox: NutrientViewer.Geometry.Rect;
                    contents: string;
                    hints: Hints
                    | null;
                    id: number | null;
                    pageIndex: number | null;
                },
            >
        )[]

      Returns this

    • Parameters

      • keyPath: Iterable<unknown>
      • ...collections: unknown[]

      Returns this

    • Parameters

      • merger: (oldVal: unknown, newVal: unknown, key: unknown) => unknown
      • ...collections: (
            | Iterable<[string, unknown], any, any>
            | Partial<
                {
                    boundingBox: NutrientViewer.Geometry.Rect;
                    contents: string;
                    hints: Hints
                    | null;
                    id: number | null;
                    pageIndex: number | null;
                },
            >
        )[]

      Returns this

    • Parameters

      • keyPath: Iterable<unknown>
      • ...collections: unknown[]

      Returns this

    • Parameters

      • merger: (
            oldVal: unknown,
            newVal: unknown,
            key: keyof {
                boundingBox: NutrientViewer.Geometry.Rect;
                contents: string;
                hints: Hints | null;
                id: number | null;
                pageIndex: number | null;
            },
        ) => unknown
      • ...collections: (
            | Iterable<[string, unknown], any, any>
            | Partial<
                {
                    boundingBox: NutrientViewer.Geometry.Rect;
                    contents: string;
                    hints: Hints
                    | null;
                    id: number | null;
                    pageIndex: number | null;
                },
            >
        )[]

      Returns this

    • Type Parameters

      • K extends keyof {
            boundingBox: NutrientViewer.Geometry.Rect;
            contents: string;
            hints: Hints | null;
            id: number | null;
            pageIndex: number | null;
        }

      Parameters

      • key: K

      Returns this

    • Parameters

      Returns this

    • Type Parameters

      • K extends keyof {
            boundingBox: NutrientViewer.Geometry.Rect;
            contents: string;
            hints: Hints | null;
            id: number | null;
            pageIndex: number | null;
        }

      Parameters

      • key: K
      • value: {
            boundingBox: NutrientViewer.Geometry.Rect;
            contents: string;
            hints: Hints | null;
            id: number | null;
            pageIndex: number | null;
        }[K]

      Returns this

    • Parameters

      • keyPath: Iterable<unknown>
      • value: unknown

      Returns this

    • Deeply converts this Record to equivalent native JavaScript Object.

      Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.

      Returns {
          boundingBox: unknown;
          contents: string;
          hints: unknown;
          id: number | null;
          pageIndex: number | null;
      }

      • boundingBox: unknown

        Position of this text line on the page.

      • contents: string

        Content of the text line.

        Text lines end with CRLF (\r\n).

      • hints: unknown

        Hints for the text line.

      • id: number | null

        An ID that is unique inside one page to reference the text line across the document.

      • pageIndex: number | null

        The page index on which the text line is placed.

        pageIndex is zero-based and has a maximum value of totalPageCount - 1.

    • Shallowly converts this Record to equivalent native JavaScript Object.

      Returns {
          boundingBox: NutrientViewer.Geometry.Rect;
          contents: string;
          hints: Hints | null;
          id: number | null;
          pageIndex: number | null;
      }

      • boundingBox: NutrientViewer.Geometry.Rect

        Position of this text line on the page.

      • contents: string

        Content of the text line.

        Text lines end with CRLF (\r\n).

      • hints: Hints | null

        Hints for the text line.

      • id: number | null

        An ID that is unique inside one page to reference the text line across the document.

      • pageIndex: number | null

        The page index on which the text line is placed.

        pageIndex is zero-based and has a maximum value of totalPageCount - 1.

    • Shallowly converts this Record to equivalent JavaScript Object.

      Returns {
          boundingBox: NutrientViewer.Geometry.Rect;
          contents: string;
          hints: Hints | null;
          id: number | null;
          pageIndex: number | null;
      }

      • boundingBox: NutrientViewer.Geometry.Rect

        Position of this text line on the page.

      • contents: string

        Content of the text line.

        Text lines end with CRLF (\r\n).

      • hints: Hints | null

        Hints for the text line.

      • id: number | null

        An ID that is unique inside one page to reference the text line across the document.

      • pageIndex: number | null

        The page index on which the text line is placed.

        pageIndex is zero-based and has a maximum value of totalPageCount - 1.

    • Returns Keyed<
          keyof {
              boundingBox: NutrientViewer.Geometry.Rect;
              contents: string;
              hints: Hints
              | null;
              id: number | null;
              pageIndex: number | null;
          },
          | string
          | number
          | NutrientViewer.Geometry.Rect
          | VisualTextRange
          | Hints
          | SyntheticTextSelectionFontDescriptor
          | TextLineSyntheticTextSelectionRun[]
          | null,
      >

    • Type Parameters

      • K extends keyof {
            boundingBox: NutrientViewer.Geometry.Rect;
            contents: string;
            hints: Hints | null;
            id: number | null;
            pageIndex: number | null;
        }

      Parameters

      • key: K
      • updater: (
            value: {
                boundingBox: NutrientViewer.Geometry.Rect;
                contents: string;
                hints: Hints | null;
                id: number | null;
                pageIndex: number | null;
            }[K],
        ) => {
            boundingBox: NutrientViewer.Geometry.Rect;
            contents: string;
            hints: Hints
            | null;
            id: number | null;
            pageIndex: number | null;
        }[K]

      Returns this

    • Parameters

      • keyPath: Iterable<unknown>
      • updater: (value: unknown) => unknown

      Returns this

    • Returns boolean

      Map#wasAltered

    • Note: Not all methods can be used on a mutable collection or within withMutations! Only set may be used mutatively.

      Parameters

      • mutator: (mutable: this) => unknown

      Returns this

      Map#withMutations