Nutrient Web SDK
    Preparing search index...

    Class SearchResult

    A match when searching the PDF.

    You can retrieve search results by using Instance#search

    Hierarchy

    • Record<
          {
              annotationRect?: null
              | NutrientViewer.Geometry.Rect;
              isAnnotation: null | boolean;
              lengthInPreview: null | number;
              locationInPreview: null | number;
              pageIndex: null | number;
              previewText: string;
              rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
          },
          this,
      > & Readonly<
          {
              annotationRect?: null
              | NutrientViewer.Geometry.Rect;
              isAnnotation: null | boolean;
              lengthInPreview: null | number;
              locationInPreview: null | number;
              pageIndex: null | number;
              previewText: string;
              rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
          },
      >
      • SearchResult
    Index

    Properties

    annotationRect?: null | NutrientViewer.Geometry.Rect

    The bounding box of the annotation in which the result was found. This property is only available when the result is an annotation.

    isAnnotation: null | boolean

    Boolean to indicate whether the matching search result is part of an annotation.

    lengthInPreview: null | number

    Length of the search term in the preview text.

    locationInPreview: null | number

    Location of the search term in the preview text.

    pageIndex: null | number

    The page where the result was found.

    previewText: string

    The text surrounding the search term that can be used to list a preview.

    All rects on the page that should be used to highlight the text.

    Methods

    • Returns IterableIterator<
          [
              keyof {
                  annotationRect?: null
                  | NutrientViewer.Geometry.Rect;
                  isAnnotation: null | boolean;
                  lengthInPreview: null | number;
                  locationInPreview: null | number;
                  pageIndex: null | number;
                  previewText: string;
                  rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
              },
              | undefined
              | null
              | string
              | number
              | boolean
              | NutrientViewer.Geometry.Rect
              | NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>,
          ],
      >

    • 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

      Parameters

      • key: K

      Returns this

      remove

    • Parameters

      Returns this

      removeIn

    • Parameters

      • other: any

      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

      Parameters

      • key: K
      • OptionalnotSetValue: any

      Returns {
          annotationRect?: null | NutrientViewer.Geometry.Rect;
          isAnnotation: null | boolean;
          lengthInPreview: null | number;
          locationInPreview: null | number;
          pageIndex: null | number;
          previewText: string;
          rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
      }[K]

    • Type Parameters

      • T

      Parameters

      • key: string
      • notSetValue: T

      Returns T

    • Parameters

      Returns any

    • Parameters

      • key: string

      Returns key is
          | "pageIndex"
          | "previewText"
          | "locationInPreview"
          | "lengthInPreview"
          | "rectsOnPage"
          | "isAnnotation"
          | "annotationRect"

    • Returns number

    • Parameters

      Returns boolean

    • Parameters

      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    annotationRect?: null
                    | NutrientViewer.Geometry.Rect;
                    isAnnotation: null | boolean;
                    lengthInPreview: null | number;
                    locationInPreview: null | number;
                    pageIndex: null | number;
                    previewText: string;
                    rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                },
            >
        )[]

      Returns this

    • Parameters

      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    annotationRect?: null
                    | NutrientViewer.Geometry.Rect;
                    isAnnotation: null | boolean;
                    lengthInPreview: null | number;
                    locationInPreview: null | number;
                    pageIndex: null | number;
                    previewText: string;
                    rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                },
            >
        )[]

      Returns this

    • Parameters

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

      Returns this

    • Parameters

      • merger: (oldVal: any, newVal: any, key: any) => any
      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    annotationRect?: null
                    | NutrientViewer.Geometry.Rect;
                    isAnnotation: null | boolean;
                    lengthInPreview: null | number;
                    locationInPreview: null | number;
                    pageIndex: null | number;
                    previewText: string;
                    rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                },
            >
        )[]

      Returns this

    • Parameters

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

      Returns this

    • Parameters

      • merger: (
            oldVal: any,
            newVal: any,
            key: keyof {
                annotationRect?: null | NutrientViewer.Geometry.Rect;
                isAnnotation: null | boolean;
                lengthInPreview: null | number;
                locationInPreview: null | number;
                pageIndex: null | number;
                previewText: string;
                rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
            },
        ) => any
      • ...collections: (
            | Iterable<[string, any]>
            | Partial<
                {
                    annotationRect?: null
                    | NutrientViewer.Geometry.Rect;
                    isAnnotation: null | boolean;
                    lengthInPreview: null | number;
                    locationInPreview: null | number;
                    pageIndex: null | number;
                    previewText: string;
                    rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
                },
            >
        )[]

      Returns this

    • Type Parameters

      Parameters

      • key: K

      Returns this

    • Parameters

      Returns this

    • Type Parameters

      Parameters

      Returns this

    • Parameters

      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 {
          annotationRect?: any;
          isAnnotation: any;
          lengthInPreview: any;
          locationInPreview: any;
          pageIndex: any;
          previewText: any;
          rectsOnPage: any;
      }

      • OptionalannotationRect?: any

        The bounding box of the annotation in which the result was found. This property is only available when the result is an annotation.

      • isAnnotation: any

        Boolean to indicate whether the matching search result is part of an annotation.

      • lengthInPreview: any

        Length of the search term in the preview text.

      • locationInPreview: any

        Location of the search term in the preview text.

      • pageIndex: any

        The page where the result was found.

      • previewText: any

        The text surrounding the search term that can be used to list a preview.

      • rectsOnPage: any

        All rects on the page that should be used to highlight the text.

    • Shallowly converts this Record to equivalent native JavaScript Object.

      Returns {
          annotationRect?: null | NutrientViewer.Geometry.Rect;
          isAnnotation: null | boolean;
          lengthInPreview: null | number;
          locationInPreview: null | number;
          pageIndex: null | number;
          previewText: string;
          rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
      }

      • OptionalannotationRect?: null | NutrientViewer.Geometry.Rect

        The bounding box of the annotation in which the result was found. This property is only available when the result is an annotation.

      • isAnnotation: null | boolean

        Boolean to indicate whether the matching search result is part of an annotation.

      • lengthInPreview: null | number

        Length of the search term in the preview text.

      • locationInPreview: null | number

        Location of the search term in the preview text.

      • pageIndex: null | number

        The page where the result was found.

      • previewText: string

        The text surrounding the search term that can be used to list a preview.

      • rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>

        All rects on the page that should be used to highlight the text.

    • Shallowly converts this Record to equivalent JavaScript Object.

      Returns {
          annotationRect?: null | NutrientViewer.Geometry.Rect;
          isAnnotation: null | boolean;
          lengthInPreview: null | number;
          locationInPreview: null | number;
          pageIndex: null | number;
          previewText: string;
          rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>;
      }

      • OptionalannotationRect?: null | NutrientViewer.Geometry.Rect

        The bounding box of the annotation in which the result was found. This property is only available when the result is an annotation.

      • isAnnotation: null | boolean

        Boolean to indicate whether the matching search result is part of an annotation.

      • lengthInPreview: null | number

        Length of the search term in the preview text.

      • locationInPreview: null | number

        Location of the search term in the preview text.

      • pageIndex: null | number

        The page where the result was found.

      • previewText: string

        The text surrounding the search term that can be used to list a preview.

      • rectsOnPage: NutrientViewer.Immutable.List<NutrientViewer.Geometry.Rect>

        All rects on the page that should be used to highlight the text.

    • Type Parameters

      Parameters

      Returns this

    • Parameters

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

      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) => any

      Returns this

      Map#withMutations