@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
43 lines • 1.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WatermarkText = void 0;
const index_1 = require("./../index");
class WatermarkText {
constructor(data) {
this.font = index_1.WatermarkFont.fromJson(data === null || data === void 0 ? void 0 : data.font);
this.position = index_1.WatermarkPosition.fromJson(data === null || data === void 0 ? void 0 : data.position);
let textDefault = "Confidential";
this.text = typeof (data === null || data === void 0 ? void 0 : data.text) !== "undefined" ? data === null || data === void 0 ? void 0 : data.text : textDefault;
}
static getFontDescription() {
return "";
}
static getPositionDescription() {
return "";
}
static getTextDefault() {
return "Confidential";
}
static getTextDescription() {
return "Specifies the text which will be output as a watermark.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new WatermarkText(data);
}
toJson() {
var _a, _b;
return {
'font': (_a = this.font) === null || _a === void 0 ? void 0 : _a.toJson(),
'position': (_b = this.position) === null || _b === void 0 ? void 0 : _b.toJson(),
'text': this.text,
};
}
clone() {
return WatermarkText.fromJson(this.toJson());
}
}
exports.WatermarkText = WatermarkText;
//# sourceMappingURL=WatermarkText.js.map