UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

40 lines 1.84 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SelectionBox = void 0; class SelectionBox { constructor(data) { let boxDefault = "crop_box"; this.box = typeof (data === null || data === void 0 ? void 0 : data.box) !== "undefined" ? data === null || data === void 0 ? void 0 : data.box : boxDefault; 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 getBoxDefault() { return "crop_box"; } static getBoxDescription() { return "Used to select the box that should be scaled.\n\n* media\\_box = The page's physical dimensions.\n* crop\\_box = The visible (printable) page area.\n* bleed\\_box = Untrimmed content position on the page (content dimensions plus trim box).\n* trim\\_box = Trimmed content position on the page (final content dimensions).\n* art\\_box = Position for special page content (images)."; } static getPagesDefault() { return "*"; } static getPagesDescription() { return "Used to define the page(s) from which boxes should be removed. 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 SelectionBox(data); } toJson() { return { 'box': this.box, 'pages': this.pages, }; } clone() { return SelectionBox.fromJson(this.toJson()); } } exports.SelectionBox = SelectionBox; //# sourceMappingURL=SelectionBox.js.map