@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
73 lines • 4.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolboxRotateRotate = void 0;
class ToolboxRotateRotate {
constructor(data) {
let degreesDefault = 90;
this.degrees = typeof (data === null || data === void 0 ? void 0 : data.degrees) !== "undefined" ? data === null || data === void 0 ? void 0 : data.degrees : degreesDefault;
let orientationDetectModeDefault = "value";
this.orientationDetectMode = typeof (data === null || data === void 0 ? void 0 : data.orientationDetectMode) !== "undefined" ? data === null || data === void 0 ? void 0 : data.orientationDetectMode : orientationDetectModeDefault;
let pageGroupDefault = "all";
this.pageGroup = typeof (data === null || data === void 0 ? void 0 : data.pageGroup) !== "undefined" ? data === null || data === void 0 ? void 0 : data.pageGroup : pageGroupDefault;
let pageOrientationDefault = "any";
this.pageOrientation = typeof (data === null || data === void 0 ? void 0 : data.pageOrientation) !== "undefined" ? data === null || data === void 0 ? void 0 : data.pageOrientation : pageOrientationDefault;
let pagesDefault = "1";
this.pages = typeof (data === null || data === void 0 ? void 0 : data.pages) !== "undefined" ? data === null || data === void 0 ? void 0 : data.pages : pagesDefault;
}
static getDegreesDefault() {
return 90;
}
static getDegreesDescription() {
return "Used to specify the clockwise rotation in degrees. The rotation is always in 90-degree increments (0, 90, 180, 270, 360). Deviating values will always be rounded down to the next lower increment (e.g.: 32 degrees will become 0 degrees and 101 degrees will become 90 degrees). Once the rotation is completed, the new value will be normalized to a range of 0 to 359 degrees. If the page being rotated has an impermissible value (e.g. 112 degrees), this value will be adjusted before the rotation operation as well (112 degrees will become 90 degrees).";
}
static getDegreesMin() {
return 0;
}
static getDegreesMax() {
return 360;
}
static getOrientationDetectModeDefault() {
return "value";
}
static getOrientationDetectModeDescription() {
return "Selects which criteria to use to determine the orientation (portrait\/landscape) of pages (see also \"pageOrientation\"):\n\n* value = Based solely on the page rotation value entered in the PDF.\n* dimensions = Based on the ratio of the page dimensions to each other.";
}
static getPageGroupDefault() {
return "all";
}
static getPageGroupDescription() {
return "Used to select pages based on their page number within the specified page range:\n\n* all = All pages\n* even = All pages with an even page number\n* odd = All pages with an odd page number";
}
static getPageOrientationDefault() {
return "any";
}
static getPageOrientationDescription() {
return "Used to select pages based on their orientation within the specified page range:\n\n* any = All pages\n* portrait = All pages in portrait format\n* landscape = All pages in landscape format";
}
static getPagesDefault() {
return "1";
}
static getPagesDescription() {
return "Defines which page(s) should be rotated. 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 ToolboxRotateRotate(data);
}
toJson() {
return {
'degrees': this.degrees,
'orientationDetectMode': this.orientationDetectMode,
'pageGroup': this.pageGroup,
'pageOrientation': this.pageOrientation,
'pages': this.pages,
};
}
clone() {
return ToolboxRotateRotate.fromJson(this.toJson());
}
}
exports.ToolboxRotateRotate = ToolboxRotateRotate;
//# sourceMappingURL=ToolboxRotateRotate.js.map