@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
58 lines • 2.37 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolboxWatermarkWatermark = void 0;
const index_1 = require("./../index");
class ToolboxWatermarkWatermark {
constructor(data) {
let angleDefault = 45;
this.angle = typeof (data === null || data === void 0 ? void 0 : data.angle) !== "undefined" ? data === null || data === void 0 ? void 0 : data.angle : angleDefault;
this.image = index_1.WatermarkImage.fromJson(data === null || data === void 0 ? void 0 : data.image);
let pagesDefault = "";
this.pages = typeof (data === null || data === void 0 ? void 0 : data.pages) !== "undefined" ? data === null || data === void 0 ? void 0 : data.pages : pagesDefault;
this.text = index_1.WatermarkText.fromJson(data === null || data === void 0 ? void 0 : data.text);
}
static getAngleDefault() {
return 45;
}
static getAngleDescription() {
return "Specifies the rotation angle for the text or image output of the watermark. Values between 0 and 360 are allowed. Rotation is performed clockwise.";
}
static getAngleMin() {
return 0;
}
static getAngleMax() {
return 360;
}
static getImageDescription() {
return "";
}
static getPagesDefault() {
return "";
}
static getPagesDescription() {
return "Specifies on which page(s) the watermark should be created. The page number can be an individual page, a page range, or a list (separated with commas) (e.g., \"1,5-6,9\"). A blank value or \"\\*\" selects all pages of the PDF document.";
}
static getTextDescription() {
return "";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ToolboxWatermarkWatermark(data);
}
toJson() {
var _a, _b;
return {
'angle': this.angle,
'image': (_a = this.image) === null || _a === void 0 ? void 0 : _a.toJson(),
'pages': this.pages,
'text': (_b = this.text) === null || _b === void 0 ? void 0 : _b.toJson(),
};
}
clone() {
return ToolboxWatermarkWatermark.fromJson(this.toJson());
}
}
exports.ToolboxWatermarkWatermark = ToolboxWatermarkWatermark;
//# sourceMappingURL=ToolboxWatermarkWatermark.js.map