@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
50 lines • 1.83 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppearancePdf = void 0;
const index_1 = require("./../index");
class AppearancePdf {
constructor(data) {
this.data = index_1.AppearanceFileData.fromJson(data.data);
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 preserveAspectRatioDefault = false;
this.preserveAspectRatio = typeof (data === null || data === void 0 ? void 0 : data.preserveAspectRatio) !== "undefined" ? data === null || data === void 0 ? void 0 : data.preserveAspectRatio : preserveAspectRatioDefault;
}
static getDataDescription() {
return "";
}
static getPageDefault() {
return 1;
}
static getPageDescription() {
return "The page that shall be used as a visual representation of the annotation.";
}
static getPageMin() {
return 1;
}
static getPreserveAspectRatioDefault() {
return false;
}
static getPreserveAspectRatioDescription() {
return "Specifies whether the aspect ratio should be maintained when scaling the annotation.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new AppearancePdf(data);
}
toJson() {
var _a;
return {
'data': (_a = this.data) === null || _a === void 0 ? void 0 : _a.toJson(),
'page': this.page,
'preserveAspectRatio': this.preserveAspectRatio,
};
}
clone() {
return AppearancePdf.fromJson(this.toJson());
}
}
exports.AppearancePdf = AppearancePdf;
//# sourceMappingURL=AppearancePdf.js.map