UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

64 lines 2.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OptionsFont = void 0; class OptionsFont { constructor(data) { let colorDefault = "#000000"; this.color = typeof (data === null || data === void 0 ? void 0 : data.color) !== "undefined" ? data === null || data === void 0 ? void 0 : data.color : colorDefault; let nameDefault = ""; this.name = typeof (data === null || data === void 0 ? void 0 : data.name) !== "undefined" ? data === null || data === void 0 ? void 0 : data.name : nameDefault; let sizeDefault = 10; this.size = typeof (data === null || data === void 0 ? void 0 : data.size) !== "undefined" ? data === null || data === void 0 ? void 0 : data.size : sizeDefault; let underlineDefault = false; this.underline = typeof (data === null || data === void 0 ? void 0 : data.underline) !== "undefined" ? data === null || data === void 0 ? void 0 : data.underline : underlineDefault; } static getColorDefault() { return "#000000"; } static getColorDescription() { return "Used to set the colour for the text output. The colour needs to be specified as a hexadecimal RGB value with a number sign before it."; } static getNameDefault() { return ""; } static getNameDescription() { return "Used to specify the name of the font that should be used for the text output. If a font is not specified, \"Helvetica\" will be used."; } static getSizeDefault() { return 10; } static getSizeDescription() { return "Used to set the text size for the text output."; } static getSizeMin() { return 1; } static getSizeMax() { return 1296; } static getUnderlineDefault() { return false; } static getUnderlineDescription() { return "If true, the text in the header and footer will be underlined."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new OptionsFont(data); } toJson() { return { 'color': this.color, 'name': this.name, 'size': this.size, 'underline': this.underline, }; } clone() { return OptionsFont.fromJson(this.toJson()); } } exports.OptionsFont = OptionsFont; //# sourceMappingURL=OptionsFont.js.map