@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
97 lines • 3.96 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UrlConverterPage = void 0;
const index_1 = require("./../index");
class UrlConverterPage {
constructor(data) {
let bottomDefault = 20;
this.bottom = typeof (data === null || data === void 0 ? void 0 : data.bottom) !== "undefined" ? data === null || data === void 0 ? void 0 : data.bottom : bottomDefault;
this.footer = index_1.UrlConverterFooter.fromJson(data === null || data === void 0 ? void 0 : data.footer);
this.header = index_1.UrlConverterHeader.fromJson(data === null || data === void 0 ? void 0 : data.header);
let heightDefault = 297;
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 = 20;
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 = 20;
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 = 20;
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 = 210;
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 20;
}
static getBottomDescription() {
return "Bottom margin settings.";
}
static getFooterDescription() {
return "";
}
static getHeaderDescription() {
return "";
}
static getHeightDefault() {
return 297;
}
static getHeightDescription() {
return "Page height.";
}
static getLeftDefault() {
return 20;
}
static getLeftDescription() {
return "Left margin settings.";
}
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 20;
}
static getRightDescription() {
return "Right margin settings.";
}
static getTopDefault() {
return 20;
}
static getTopDescription() {
return "Top margin settings.";
}
static getWidthDefault() {
return 210;
}
static getWidthDescription() {
return "Page width.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new UrlConverterPage(data);
}
toJson() {
var _a, _b;
return {
'bottom': this.bottom,
'footer': (_a = this.footer) === null || _a === void 0 ? void 0 : _a.toJson(),
'header': (_b = this.header) === null || _b === void 0 ? void 0 : _b.toJson(),
'height': this.height,
'left': this.left,
'metrics': this.metrics,
'right': this.right,
'top': this.top,
'width': this.width,
};
}
clone() {
return UrlConverterPage.fromJson(this.toJson());
}
}
exports.UrlConverterPage = UrlConverterPage;
//# sourceMappingURL=UrlConverterPage.js.map