UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

76 lines 2.99 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ZoomDestinationZoomPage = void 0; class ZoomDestinationZoomPage { constructor(data) { let leftOffsetDefault = 0; this.leftOffset = typeof (data === null || data === void 0 ? void 0 : data.leftOffset) !== "undefined" ? data === null || data === void 0 ? void 0 : data.leftOffset : leftOffsetDefault; let metricsDefault = "px"; this.metrics = typeof (data === null || data === void 0 ? void 0 : data.metrics) !== "undefined" ? data === null || data === void 0 ? void 0 : data.metrics : metricsDefault; 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 topOffsetDefault = 0; this.topOffset = typeof (data === null || data === void 0 ? void 0 : data.topOffset) !== "undefined" ? data === null || data === void 0 ? void 0 : data.topOffset : topOffsetDefault; let zoomDefault = 100; this.zoom = typeof (data === null || data === void 0 ? void 0 : data.zoom) !== "undefined" ? data === null || data === void 0 ? void 0 : data.zoom : zoomDefault; } static getLeftOffsetDefault() { return 0; } static getLeftOffsetDescription() { return "The area's offset from the left page margin."; } static getMetricsDefault() { return "px"; } 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 getPageDefault() { return 1; } static getPageDescription() { return "The document page to which the jump will be."; } static getPageMin() { return 1; } static getTopOffsetDefault() { return 0; } static getTopOffsetDescription() { return "The area's offset from the top page margin."; } static getZoomDefault() { return 100; } static getZoomDescription() { return "Used to set the value for zooming (as a percentage)."; } static getZoomMin() { return 0; } static getZoomMax() { return 6400; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new ZoomDestinationZoomPage(data); } toJson() { return { 'leftOffset': this.leftOffset, 'metrics': this.metrics, 'page': this.page, 'topOffset': this.topOffset, 'zoom': this.zoom, }; } clone() { return ZoomDestinationZoomPage.fromJson(this.toJson()); } } exports.ZoomDestinationZoomPage = ZoomDestinationZoomPage; //# sourceMappingURL=ZoomDestinationZoomPage.js.map