UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

95 lines 3.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PagePages = void 0; const index_1 = require("./../index"); class PagePages { constructor(data) { this.boxes = index_1.Boxes.fromJson(data.boxes); 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 labelDefault = ""; this.label = typeof (data === null || data === void 0 ? void 0 : data.label) !== "undefined" ? data === null || data === void 0 ? void 0 : data.label : labelDefault; let numberDefault = 0; this.number = typeof (data === null || data === void 0 ? void 0 : data.number) !== "undefined" ? data === null || data === void 0 ? void 0 : data.number : numberDefault; let objectKeyDefault = ""; this.objectKey = typeof (data === null || data === void 0 ? void 0 : data.objectKey) !== "undefined" ? data === null || data === void 0 ? void 0 : data.objectKey : objectKeyDefault; let rotationDefault = 0; this.rotation = typeof (data === null || data === void 0 ? void 0 : data.rotation) !== "undefined" ? data === null || data === void 0 ? void 0 : data.rotation : rotationDefault; 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 getBoxesDescription() { return ""; } static getHeightDefault() { return 0; } static getHeightDescription() { return "The height of this page in points."; } static getHeightMin() { return 0; } static getLabelDefault() { return ""; } static getLabelDescription() { return "The page label of this page."; } static getNumberDefault() { return 0; } static getNumberDescription() { return "The page number of this page."; } static getNumberMin() { return 0; } static getObjectKeyDefault() { return ""; } static getObjectKeyDescription() { return "The object ID of the page. **Info:** A PDF object ID consists of two numbers, where the first number selects the object's number and the second the \"generation\" of the object. The object ID shall always be unique within the context of the document and can be used to select a specific object."; } static getRotationDefault() { return 0; } static getRotationDescription() { return "The rotation of this page in degrees."; } static getRotationMin() { return 0; } static getWidthDefault() { return 0; } static getWidthDescription() { return "The width of this page in points."; } static getWidthMin() { return 0; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new PagePages(data); } toJson() { var _a; return { 'boxes': (_a = this.boxes) === null || _a === void 0 ? void 0 : _a.toJson(), 'height': this.height, 'label': this.label, 'number': this.number, 'objectKey': this.objectKey, 'rotation': this.rotation, 'width': this.width, }; } clone() { return PagePages.fromJson(this.toJson()); } } exports.PagePages = PagePages; //# sourceMappingURL=PagePages.js.map