@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
49 lines • 1.86 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Boxes = void 0;
const index_1 = require("./../index");
class Boxes {
constructor(data) {
this.artBox = index_1.MetadataRectangle.fromJson(data === null || data === void 0 ? void 0 : data.artBox);
this.bleedBox = index_1.MetadataRectangle.fromJson(data === null || data === void 0 ? void 0 : data.bleedBox);
this.cropBox = index_1.MetadataRectangle.fromJson(data === null || data === void 0 ? void 0 : data.cropBox);
this.mediaBox = index_1.MetadataRectangle.fromJson(data.mediaBox);
this.trimBox = index_1.MetadataRectangle.fromJson(data === null || data === void 0 ? void 0 : data.trimBox);
}
static getArtBoxDescription() {
return "";
}
static getBleedBoxDescription() {
return "";
}
static getCropBoxDescription() {
return "";
}
static getMediaBoxDescription() {
return "";
}
static getTrimBoxDescription() {
return "";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new Boxes(data);
}
toJson() {
var _a, _b, _c, _d, _e;
return {
'artBox': (_a = this.artBox) === null || _a === void 0 ? void 0 : _a.toJson(),
'bleedBox': (_b = this.bleedBox) === null || _b === void 0 ? void 0 : _b.toJson(),
'cropBox': (_c = this.cropBox) === null || _c === void 0 ? void 0 : _c.toJson(),
'mediaBox': (_d = this.mediaBox) === null || _d === void 0 ? void 0 : _d.toJson(),
'trimBox': (_e = this.trimBox) === null || _e === void 0 ? void 0 : _e.toJson(),
};
}
clone() {
return Boxes.fromJson(this.toJson());
}
}
exports.Boxes = Boxes;
//# sourceMappingURL=Boxes.js.map