ComPDF React Native - v3.0.0
    Preparing search index...

    Class CPDFTextRange

    Copyright © 2014-2026 PDF Technologies, Inc. All Rights Reserved.

    THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT. UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. This notice may not be removed from this file.

    Index

    Constructors

    • Parameters

      • pageIndex: number
      • location: number
      • length: number
      • textRangeIndex: number

      Returns CPDFTextRange

    Methods

    • Returns any

    • Returns a new CPDFTextRange that expands the current range by the given number of characters before and after the original range.

      If the before value causes the start position to be less than 0, it will automatically clamp the start to 0 and reduce the total length accordingly to avoid overflow.

      Parameters

      • before: number = 0

        The number of characters to include before the original range. Default is 0.

      • after: number = 0

        The number of characters to include after the original range. Default is 0.

      Returns CPDFTextRange

      A new CPDFTextRange instance with adjusted location and length.

    Properties

    pageIndex: number
    location: number
    length: number
    textRangeIndex: number