@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
55 lines • 2.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SanitizePages = void 0;
class SanitizePages {
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 enabledDefault = true;
this.enabled = typeof (data === null || data === void 0 ? void 0 : data.enabled) !== "undefined" ? data === null || data === void 0 ? void 0 : data.enabled : enabledDefault;
let pagesDefault = "*";
this.pages = typeof (data === null || data === void 0 ? void 0 : data.pages) !== "undefined" ? data === null || data === void 0 ? void 0 : data.pages : pagesDefault;
}
static getDpiDefault() {
return 72;
}
static getDpiDescription() {
return "Used to specify the resolution for the image being generated. Higher resolutions will result in lower quality loss, but may also result in significantly larger document sizes.";
}
static getDpiMin() {
return 0;
}
static getDpiMax() {
return 9600;
}
static getEnabledDefault() {
return true;
}
static getEnabledDescription() {
return "If set to \"false\", this sanitize operation shall not be applied.";
}
static getPagesDefault() {
return "*";
}
static getPagesDescription() {
return "Defines which page(s) should be flattened. The page number can be an individual page, a page range, or a list (separated with commas) (e.g., \"1,5-6,9\"). To specify \"all pages,\" use an asterisk (\"\\*\").";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new SanitizePages(data);
}
toJson() {
return {
'dpi': this.dpi,
'enabled': this.enabled,
'pages': this.pages,
};
}
clone() {
return SanitizePages.fromJson(this.toJson());
}
}
exports.SanitizePages = SanitizePages;
//# sourceMappingURL=SanitizePages.js.map