@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
70 lines • 2.65 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Png = void 0;
class Png {
constructor(data) {
let dpiDefault = 72;
this.dpi = typeof (data === null || data === void 0 ? void 0 : data.dpi) !== "undefined" ? data === null || data === void 0 ? void 0 : data.dpi : dpiDefault;
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 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 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 getDpiDefault() {
return 72;
}
static getDpiDescription() {
return "This parameter is used to define the image's DPI resolution. The larger the value, the larger the image's x, y resolution. In addition, the larger the DPI resolution, the larger the size of the image file.";
}
static getDpiMin() {
return 0;
}
static getDpiMax() {
return 9600;
}
static getHeightDefault() {
return 0;
}
static getHeightDescription() {
return "Used to limit the maximum height of the exported image. 0 = No restriction";
}
static getHeightMin() {
return 0;
}
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 getWidthDefault() {
return 0;
}
static getWidthDescription() {
return "Used to limit the maximum width of the exported image. 0 = No restriction";
}
static getWidthMin() {
return 0;
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new Png(data);
}
toJson() {
return {
'dpi': this.dpi,
'height': this.height,
'metrics': this.metrics,
'width': this.width,
};
}
clone() {
return Png.fromJson(this.toJson());
}
}
exports.Png = Png;
//# sourceMappingURL=Png.js.map