@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
63 lines • 3.59 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MergeFileData = void 0;
class MergeFileData {
constructor(data) {
let formatDefault = "pdf";
this.format = typeof (data === null || data === void 0 ? void 0 : data.format) !== "undefined" ? data === null || data === void 0 ? void 0 : data.format : formatDefault;
let outlineNameDefault = "";
this.outlineName = typeof (data === null || data === void 0 ? void 0 : data.outlineName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.outlineName : outlineNameDefault;
let sourceDefault = "value";
this.source = typeof (data === null || data === void 0 ? void 0 : data.source) !== "undefined" ? data === null || data === void 0 ? void 0 : data.source : sourceDefault;
let uriDefault = "";
this.uri = typeof (data === null || data === void 0 ? void 0 : data.uri) !== "undefined" ? data === null || data === void 0 ? void 0 : data.uri : uriDefault;
this.value = data === null || data === void 0 ? void 0 : data.value;
}
static getFormatDefault() {
return "pdf";
}
static getFormatDescription() {
return "Specifies the format how to pass the documents to be used for merging.\n\n* pdf = A single PDF file\n* zip = It is a ZIP file that contains one or more PDF documents.\n* id = It is a semicolon separated list of document ID's referencing documents already on the server (REST API only).\n\n**Important:** The \"id\" parameter can be used only with REST API. Each document that has been uploaded to the server via REST API has a unique ID. This ID can be used to reference the document. In the content of the \"data\" element, the list is passed as BASE64 content. Example for two documents:\n\n* List of documents: 3bde686a47284a2da3bfce62bd6bb8bd;f5c2b314d0c74fd0878d1f4ca310b0ad\n* BASE64 encoded: M2JkZTY4NmE0NzI4NGEyZGEzYmZjZTYyYmQ2YmI4YmQ7ZjVjMmIzMTRkMGM3NGZkMDg3OGQxZjRjYTMxMGIwYWQ=";
}
static getOutlineNameDefault() {
return "";
}
static getOutlineNameDescription() {
return "Used to define the base path that should be used for outline nodes of the appended document. This parameter can contain a slash separated path and should ideally end with the name of the document (\"A\/B\/filename\"). If this parameter is not set, all outlines will be appended to the root outline node.";
}
static getSourceDefault() {
return "value";
}
static getSourceDescription() {
return "Selects the data source for the hereby expressed resource. Possible values are:\n\n* value = The element's value shall contain the BASE64 encoded data.\n* uri = The data shall be located at the given uri.";
}
static getUriDefault() {
return "";
}
static getUriDescription() {
return "The uri the data shall be located at. (This shall only have effect, if the \"source\" is \"uri\".)";
}
static getValueDescription() {
return "";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new MergeFileData(data);
}
toJson() {
return {
'format': this.format,
'outlineName': this.outlineName,
'source': this.source,
'uri': this.uri,
'value': this.value,
};
}
clone() {
return MergeFileData.fromJson(this.toJson());
}
}
exports.MergeFileData = MergeFileData;
//# sourceMappingURL=MergeFileData.js.map