@kingstonsoftware/pdf-o-rama
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -32,12 +32,2 @@ "use strict"; | ||
function toText(item) { | ||
if (item.getType() === _hummus.default.ePDFObjectLiteralString) { | ||
return item.toPDFLiteralString().toText(); | ||
} else if (item.getType() === _hummus.default.ePDFObjectHexString) { | ||
return item.toPDFHexString().toText(); | ||
} else { | ||
return item.value; | ||
} | ||
} | ||
let PDFTool = (0, _autobindDecorator.default)(_class = class PDFTool { | ||
@@ -89,3 +79,3 @@ constructor(toolName, log, container) { | ||
if (annot.getType() === 9) { | ||
if (annot.getType() === this.hummus.ePDFObjectIndirectObjectReference) { | ||
annotDict = this.pdfReader.parseNewObject(annot.getObjectID()); | ||
@@ -197,4 +187,3 @@ } else { | ||
(0, _assert.default)(options.outputFile, "No output file specified"); | ||
(0, _assert.default)(options.dataFile, "Must specify a data file"); | ||
(0, _assert.default)(this.fs.existsSync(options.dataFile), `File '${options.dataFile}' does not exist`); | ||
(0, _assert.default)(options.dataFile && !options.data || !optons.dataFile && options.data, "Must specify a data file or data"); | ||
let data = options.data; | ||
@@ -216,3 +205,3 @@ | ||
if ((0, _md.default)(buf.buffer) !== data.md5) { | ||
throw new Error(`MD5 for ${options.pdfFile} does not match the one in the data file`); | ||
throw new Error(`MD5 for ${options.pdfFile} does not match the one in the data`); | ||
} | ||
@@ -219,0 +208,0 @@ } |
@@ -7,6 +7,6 @@ "use strict"; | ||
exports.fullVersion = exports.version = void 0; | ||
const version = '2.2.0'; | ||
const version = '2.2.1'; | ||
exports.version = version; | ||
const fullVersion = '2.2.0-20200202.0'; | ||
const fullVersion = '2.2.1-20200204.0'; | ||
exports.fullVersion = fullVersion; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@kingstonsoftware/pdf-o-rama", | ||
"private": false, | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "A tool for manipulating PDF files", | ||
@@ -6,0 +6,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68216
530