UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

38 lines 1.74 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CompressSettings = void 0; const index_1 = require("./../index"); class CompressSettings { constructor(data) { this.compressObjects = index_1.CompressObjects.fromJson(data === null || data === void 0 ? void 0 : data.compressObjects); let compressProfileDefault = "never"; this.compressProfile = typeof (data === null || data === void 0 ? void 0 : data.compressProfile) !== "undefined" ? data === null || data === void 0 ? void 0 : data.compressProfile : compressProfileDefault; } static getCompressObjectsDescription() { return ""; } static getCompressProfileDefault() { return "never"; } static getCompressProfileDescription() { return "Sets the profile for automatic document compression and thus defines whether compression should be applied when saving.\n\n* always = PDF documents should always be compressed when saved.\n* never = PDF documents should not be automatically compressed.\n* recompress = PDF documents should only be compressed automatically if they were already compressed previously."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new CompressSettings(data); } toJson() { var _a; return { 'compressObjects': (_a = this.compressObjects) === null || _a === void 0 ? void 0 : _a.toJson(), 'compressProfile': this.compressProfile, }; } clone() { return CompressSettings.fromJson(this.toJson()); } } exports.CompressSettings = CompressSettings; //# sourceMappingURL=CompressSettings.js.map