@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.
34 lines • 1.16 kB
JavaScript
;
/**
* 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.CPDFGoToAction = void 0;
const CPDFAction_1 = require("./CPDFAction");
class CPDFGoToAction extends CPDFAction_1.CPDFAction {
pageIndex;
constructor(params) {
super(params);
this.actionType = 'goTo';
this.pageIndex = params.pageIndex ?? 0;
}
static toPage(pageIndex) {
return new CPDFGoToAction({ actionType: 'goTo', pageIndex: pageIndex });
}
static fromJson(json) {
return new this(json);
}
toJSON() {
return {
...super.toJSON(),
pageIndex: this.pageIndex
};
}
}
exports.CPDFGoToAction = CPDFGoToAction;
//# sourceMappingURL=CPDFGoToAction.js.map