@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
100 lines • 4.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PaddedRectangle = void 0;
class PaddedRectangle {
constructor(data) {
let bottomDefault = 0;
this.bottom = typeof (data === null || data === void 0 ? void 0 : data.bottom) !== "undefined" ? data === null || data === void 0 ? void 0 : data.bottom : bottomDefault;
let coordinatesDefault = "user";
this.coordinates = typeof (data === null || data === void 0 ? void 0 : data.coordinates) !== "undefined" ? data === null || data === void 0 ? void 0 : data.coordinates : coordinatesDefault;
let heightDefault = 0;
this.height = typeof (data === null || data === void 0 ? void 0 : data.height) !== "undefined" ? data === null || data === void 0 ? void 0 : data.height : heightDefault;
let leftDefault = 0;
this.left = typeof (data === null || data === void 0 ? void 0 : data.left) !== "undefined" ? data === null || data === void 0 ? void 0 : data.left : leftDefault;
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 rightDefault = 0;
this.right = typeof (data === null || data === void 0 ? void 0 : data.right) !== "undefined" ? data === null || data === void 0 ? void 0 : data.right : rightDefault;
let topDefault = 0;
this.top = typeof (data === null || data === void 0 ? void 0 : data.top) !== "undefined" ? data === null || data === void 0 ? void 0 : data.top : topDefault;
let widthDefault = 0;
this.width = typeof (data === null || data === void 0 ? void 0 : data.width) !== "undefined" ? data === null || data === void 0 ? void 0 : data.width : widthDefault;
}
static getBottomDefault() {
return 0;
}
static getBottomDescription() {
return "The bottom padding value.";
}
static getCoordinatesDefault() {
return "user";
}
static getCoordinatesDescription() {
return "Used to define the coordinate system and, accordingly, the origin for the position arguments.\n\n* user = User coordinate system (origin at top left)\n* pdf = PDF coordinate system (origin at bottom left)";
}
static getHeightDefault() {
return 0;
}
static getHeightDescription() {
return "The height dimension.";
}
static getHeightMin() {
return 0;
}
static getLeftDefault() {
return 0;
}
static getLeftDescription() {
return "The left padding value.";
}
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 getRightDefault() {
return 0;
}
static getRightDescription() {
return "The right padding value.";
}
static getTopDefault() {
return 0;
}
static getTopDescription() {
return "The top padding value.";
}
static getWidthDefault() {
return 0;
}
static getWidthDescription() {
return "The width dimension.";
}
static getWidthMin() {
return 0;
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new PaddedRectangle(data);
}
toJson() {
return {
'bottom': this.bottom,
'coordinates': this.coordinates,
'height': this.height,
'left': this.left,
'metrics': this.metrics,
'right': this.right,
'top': this.top,
'width': this.width,
};
}
clone() {
return PaddedRectangle.fromJson(this.toJson());
}
}
exports.PaddedRectangle = PaddedRectangle;
//# sourceMappingURL=PaddedRectangle.js.map