Comparing version 0.6.4 to 0.6.5
@@ -29,4 +29,2 @@ 'use strict'; | ||
var _iChars = "!@#$%^&*()+=[]\\\';,/{}|\":<>?~`.-_ "; | ||
var _continue = function(callback, err) { | ||
@@ -158,3 +156,5 @@ if (err) | ||
this.pdfParser.destroy(); | ||
if (this.pdfParser) { | ||
this.pdfParser.destroy(); | ||
} | ||
this.pdfParser = null; | ||
@@ -170,11 +170,3 @@ this.curProcessor = null; | ||
else { | ||
var inputFile = path.basename(this.inputFile.toLowerCase(), '.pdf'); | ||
if (!inputFile || inputFile.length < 1 || _iChars.indexOf(inputFile.substr(0,1)) >= 0) { | ||
nodeUtil.p2jinfo("Skipped: invalid filename: " + this.inputFile); | ||
this.curProcessor.inputCount--; | ||
_continue.call(this, callback); | ||
} | ||
else { | ||
_parseOnePDF.call(this, callback); | ||
} | ||
_parseOnePDF.call(this, callback); | ||
} | ||
@@ -297,4 +289,5 @@ }; | ||
fs.readdir(inputDir, function(err, files) { | ||
var _iChars = "!@#$%^&*()+=[]\\\';,/{}|\":<>?~`.-_ "; | ||
var pdfFiles = files.filter(function(file) { | ||
return file.substr(-4).toLowerCase() === '.pdf'; | ||
return file.substr(-4).toLowerCase() === '.pdf' && _iChars.indexOf(file.substr(0,1)) < 0; | ||
}); | ||
@@ -301,0 +294,0 @@ |
{ | ||
"name": "pdf2json", | ||
"_id": "pdf2json@0.6.4", | ||
"version": "0.6.4", | ||
"_id": "pdf2json@0.6.5", | ||
"version": "0.6.5", | ||
"description": "A PDF file parser that converts PDF binaries to text based JSON, powered by porting a fork of PDF.JS to Node.js", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
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
4021021
50311