@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
47 lines • 2.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PdfPassword = void 0;
const index_1 = require("./../index");
class PdfPassword {
constructor(data) {
this.keyPair = index_1.KeyPair.fromJson(data === null || data === void 0 ? void 0 : data.keyPair);
let openDefault = "";
this.open = typeof (data === null || data === void 0 ? void 0 : data.open) !== "undefined" ? data === null || data === void 0 ? void 0 : data.open : openDefault;
let permissionDefault = "";
this.permission = typeof (data === null || data === void 0 ? void 0 : data.permission) !== "undefined" ? data === null || data === void 0 ? void 0 : data.permission : permissionDefault;
}
static getKeyPairDescription() {
return "";
}
static getOpenDefault() {
return "";
}
static getOpenDescription() {
return "A password that is required to open the document. If the provided PDF document is protected in such a way that a password (user password) is required to read the document, the corresponding password must also be passed. Without this password it is not possible to edit the document with the web service, because it cannot be read.";
}
static getPermissionDefault() {
return "";
}
static getPermissionDescription() {
return "A password that allows \"editing access\" to the document. If the provided PDF document is password protected and the web service operation is to edit the document, then the appropriate password (owner password) must be provided to unlock the document.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new PdfPassword(data);
}
toJson() {
var _a;
return {
'keyPair': (_a = this.keyPair) === null || _a === void 0 ? void 0 : _a.toJson(),
'open': this.open,
'permission': this.permission,
};
}
clone() {
return PdfPassword.fromJson(this.toJson());
}
}
exports.PdfPassword = PdfPassword;
//# sourceMappingURL=PdfPassword.js.map