@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
67 lines • 3.68 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtractionWords = void 0;
class ExtractionWords {
constructor(data) {
let delimitAfterPunctuationDefault = true;
this.delimitAfterPunctuation = typeof (data === null || data === void 0 ? void 0 : data.delimitAfterPunctuation) !== "undefined" ? data === null || data === void 0 ? void 0 : data.delimitAfterPunctuation : delimitAfterPunctuationDefault;
let extendedSequenceCharactersDefault = false;
this.extendedSequenceCharacters = typeof (data === null || data === void 0 ? void 0 : data.extendedSequenceCharacters) !== "undefined" ? data === null || data === void 0 ? void 0 : data.extendedSequenceCharacters : extendedSequenceCharactersDefault;
let fileFormatDefault = "xml";
this.fileFormat = typeof (data === null || data === void 0 ? void 0 : data.fileFormat) !== "undefined" ? data === null || data === void 0 ? void 0 : data.fileFormat : fileFormatDefault;
let pagesDefault = "";
this.pages = typeof (data === null || data === void 0 ? void 0 : data.pages) !== "undefined" ? data === null || data === void 0 ? void 0 : data.pages : pagesDefault;
let removePunctuationDefault = false;
this.removePunctuation = typeof (data === null || data === void 0 ? void 0 : data.removePunctuation) !== "undefined" ? data === null || data === void 0 ? void 0 : data.removePunctuation : removePunctuationDefault;
}
static getDelimitAfterPunctuationDefault() {
return true;
}
static getDelimitAfterPunctuationDescription() {
return "If this attribute is set to true, a new word will be started after each punctuation mark.";
}
static getExtendedSequenceCharactersDefault() {
return false;
}
static getExtendedSequenceCharactersDescription() {
return "This attribute specifies whether quotation marks and apostrophes should be handled the same way as brackets (such as parentheses and square brackets), i.e., whether they should be placed before the word they enclose.";
}
static getFileFormatDefault() {
return "xml";
}
static getFileFormatDescription() {
return "Used to define the output format for the PDF document text contents being extracted.\n\n* text = Text document\n* xml = XML document\n* json = JSON data structure";
}
static getPagesDefault() {
return "";
}
static getPagesDescription() {
return "Used to define which page(s) should be used for the extraction mode. The page number can be either an individual page, a page range, or a list (separated with commas) (e.g., \"1,5-6,9\"). A blank value or \"\\*\" selects all pages of the PDF document.";
}
static getRemovePunctuationDefault() {
return false;
}
static getRemovePunctuationDescription() {
return "Used to specify whether punctuation marks should be included in the export or whether they should be explicitly removed.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ExtractionWords(data);
}
toJson() {
return {
'delimitAfterPunctuation': this.delimitAfterPunctuation,
'extendedSequenceCharacters': this.extendedSequenceCharacters,
'fileFormat': this.fileFormat,
'pages': this.pages,
'removePunctuation': this.removePunctuation,
};
}
clone() {
return ExtractionWords.fromJson(this.toJson());
}
}
exports.ExtractionWords = ExtractionWords;
//# sourceMappingURL=ExtractionWords.js.map