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.

43 lines 1.51 kB
"use strict"; /** * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.CPDFTextLine = void 0; const CPDFTextRange_1 = require("./CPDFTextRange"); 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_1.CPDFTextRange(this.pageIndex, this.location, this.length, this.lineIndex); } } exports.CPDFTextLine = CPDFTextLine; //# sourceMappingURL=CPDFTextLine.js.map