@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.
48 lines • 2.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CPDFTextStampColor = exports.CPDFTextStampShape = exports.CPDFTextStamp = void 0;
const CPDFEnumUtils_1 = require("../util/CPDFEnumUtils");
/**
* 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.
*/
class CPDFTextStamp {
content;
date;
shape;
color;
constructor(params) {
this.content = params.content;
this.date = params.date;
this.shape = params.shape ?? CPDFTextStampShape.rect;
this.color = params.color ?? CPDFTextStampColor.white;
}
static fromJson(json) {
return new CPDFTextStamp({
content: json?.content ?? '',
date: json?.date ?? '',
shape: (0, CPDFEnumUtils_1.safeParseEnumValue)(json?.shape, Object.values(CPDFTextStampShape), CPDFTextStampShape.rect),
color: (0, CPDFEnumUtils_1.safeParseEnumValue)(json?.color, Object.values(CPDFTextStampColor), CPDFTextStampColor.white),
});
}
}
exports.CPDFTextStamp = CPDFTextStamp;
var CPDFTextStampShape;
(function (CPDFTextStampShape) {
CPDFTextStampShape["rect"] = "rect";
CPDFTextStampShape["leftTriangle"] = "leftTriangle";
CPDFTextStampShape["rightTriangle"] = "rightTriangle";
CPDFTextStampShape["none"] = "none";
})(CPDFTextStampShape || (exports.CPDFTextStampShape = CPDFTextStampShape = {}));
var CPDFTextStampColor;
(function (CPDFTextStampColor) {
CPDFTextStampColor["white"] = "white";
CPDFTextStampColor["red"] = "red";
CPDFTextStampColor["green"] = "green";
CPDFTextStampColor["blue"] = "blue";
})(CPDFTextStampColor || (exports.CPDFTextStampColor = CPDFTextStampColor = {}));
//# sourceMappingURL=CPDFTextStamp.js.map