@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
79 lines • 3.49 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FitRectangleDestinationFitRectangle = void 0;
class FitRectangleDestinationFitRectangle {
constructor(data) {
let bottomOffsetDefault = 0;
this.bottomOffset = typeof (data === null || data === void 0 ? void 0 : data.bottomOffset) !== "undefined" ? data === null || data === void 0 ? void 0 : data.bottomOffset : bottomOffsetDefault;
let leftOffsetDefault = 0;
this.leftOffset = typeof (data === null || data === void 0 ? void 0 : data.leftOffset) !== "undefined" ? data === null || data === void 0 ? void 0 : data.leftOffset : leftOffsetDefault;
let metricsDefault = "px";
this.metrics = typeof (data === null || data === void 0 ? void 0 : data.metrics) !== "undefined" ? data === null || data === void 0 ? void 0 : data.metrics : metricsDefault;
let pageDefault = 1;
this.page = typeof (data === null || data === void 0 ? void 0 : data.page) !== "undefined" ? data === null || data === void 0 ? void 0 : data.page : pageDefault;
let rightOffsetDefault = 0;
this.rightOffset = typeof (data === null || data === void 0 ? void 0 : data.rightOffset) !== "undefined" ? data === null || data === void 0 ? void 0 : data.rightOffset : rightOffsetDefault;
let topOffsetDefault = 0;
this.topOffset = typeof (data === null || data === void 0 ? void 0 : data.topOffset) !== "undefined" ? data === null || data === void 0 ? void 0 : data.topOffset : topOffsetDefault;
}
static getBottomOffsetDefault() {
return 0;
}
static getBottomOffsetDescription() {
return "The area's offset from the bottom page margin.";
}
static getLeftOffsetDefault() {
return 0;
}
static getLeftOffsetDescription() {
return "The area's offset from the left page margin.";
}
static getMetricsDefault() {
return "px";
}
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 getPageDefault() {
return 1;
}
static getPageDescription() {
return "The document page to which the jump will be.";
}
static getPageMin() {
return 1;
}
static getRightOffsetDefault() {
return 0;
}
static getRightOffsetDescription() {
return "The area's offset from the right page margin.";
}
static getTopOffsetDefault() {
return 0;
}
static getTopOffsetDescription() {
return "The area's offset from the top page margin.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new FitRectangleDestinationFitRectangle(data);
}
toJson() {
return {
'bottomOffset': this.bottomOffset,
'leftOffset': this.leftOffset,
'metrics': this.metrics,
'page': this.page,
'rightOffset': this.rightOffset,
'topOffset': this.topOffset,
};
}
clone() {
return FitRectangleDestinationFitRectangle.fromJson(this.toJson());
}
}
exports.FitRectangleDestinationFitRectangle = FitRectangleDestinationFitRectangle;
//# sourceMappingURL=FitRectangleDestinationFitRectangle.js.map