UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

64 lines 3.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PositionBackgroundBaseSettings = void 0; class PositionBackgroundBaseSettings { constructor(data) { let metricsDefault = "mm"; this.metrics = typeof (data === null || data === void 0 ? void 0 : data.metrics) !== "undefined" ? data === null || data === void 0 ? void 0 : data.metrics : metricsDefault; let positionDefault = "center_center"; this.position = typeof (data === null || data === void 0 ? void 0 : data.position) !== "undefined" ? data === null || data === void 0 ? void 0 : data.position : positionDefault; let xDefault = 0; this.x = typeof (data === null || data === void 0 ? void 0 : data.x) !== "undefined" ? data === null || data === void 0 ? void 0 : data.x : xDefault; let yDefault = 0; this.y = typeof (data === null || data === void 0 ? void 0 : data.y) !== "undefined" ? data === null || data === void 0 ? void 0 : data.y : yDefault; } static getMetricsDefault() { return "mm"; } static getMetricsDescription() { return "Unit for the X-axis\/Y-axis position and signature field height and width arguments:\n\n* pt = Points(1\/72 inch)\n* pc = Picas(12 points)\n* px = Pixels(1\/96 inch)\n* mm = Millimeters\n* in = Inches"; } static getPositionDefault() { return "center_center"; } static getPositionDescription() { return "Uses one of multiple preset positions in order to position the background on the page.\n\n* custom = Disable the use of a preset position.\n* top\\_left = Positions the background in the top left corner.\n* top\\_center = Positions the background in the centre on the top margin.\n* top\\_right = Positions the background in the top right corner.\n* center\\_left = Positions the background at the centre of the page, to the left.\n* center\\_center = Positions the background at the centre of the page.\n* center\\_right = Positions the background at the centre of the page, to the right.\n* bottom\\_left = Positions the background in the bottom left corner.\n* bottom\\_center = Positions the background in the centre on the bottom margin.\n* bottom\\_right = Positions the background in the bottom right corner."; } static getXDefault() { return 0; } static getXDescription() { return "X-axis position of rectangle."; } static getXMin() { return 0; } static getYDefault() { return 0; } static getYDescription() { return "Y-axis position of rectangle."; } static getYMin() { return 0; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new PositionBackgroundBaseSettings(data); } toJson() { return { 'metrics': this.metrics, 'position': this.position, 'x': this.x, 'y': this.y, }; } clone() { return PositionBackgroundBaseSettings.fromJson(this.toJson()); } } exports.PositionBackgroundBaseSettings = PositionBackgroundBaseSettings; //# sourceMappingURL=PositionBackgroundBaseSettings.js.map