UNPKG

@compdfkit_pdf_sdk/react_native

Version:

ComPDFKit for React Native is a comprehensive SDK that allows you to quickly add PDF functionality to Android, iOS, and React Native applications.

39 lines 1.36 kB
/** * 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. */ import { CPDFTextRange } from "./CPDFTextRange"; export class CPDFTextLine { pageIndex; lineIndex; location; length; rect; constructor(params = {}) { this.pageIndex = params.pageIndex ?? params.page_index ?? 0; this.lineIndex = params.lineIndex ?? params.line_index ?? 0; this.location = params.location ?? 0; this.length = params.length ?? 0; this.rect = params.rect ?? { left: 0, top: 0, right: 0, bottom: 0 }; } static fromJson(json) { return new CPDFTextLine(json); } toJson() { return { pageIndex: this.pageIndex, lineIndex: this.lineIndex, location: this.location, length: this.length, rect: this.rect, }; } toTextRange() { return new CPDFTextRange(this.pageIndex, this.location, this.length, this.lineIndex); } } //# sourceMappingURL=CPDFTextLine.js.map