Comparing version 0.5.7 to 0.5.8
@@ -70,2 +70,3 @@ 'use strict'; | ||
nodeUtil.p2jinfo("Transcoding " + this.inputFile + " to - " + this.outputPath); | ||
this.pdfParser.loadPDF(this.inputPath, (_.has(argv, 's') ? 0 : 5)); | ||
@@ -117,3 +118,2 @@ }; | ||
else { | ||
nodeUtil.p2jinfo("Transcoding " + this.inputFile + " to - " + this.outputPath); | ||
fs.closeSync(fod); | ||
@@ -148,3 +148,4 @@ fs.unlinkSync(this.outputPath); | ||
if (!inputFile || inputFile.length < 1 || _iChars.indexOf(inputFile.substr(0,1)) >= 0) { | ||
nodeUtil.p2jinfo("Skipped PDF " + this.inputFile + " - " + "invalid filename."); | ||
nodeUtil.p2jinfo("Skipped: invalid filename: " + this.inputFile); | ||
this.curProcessor.inputCount--; | ||
_continue.call(this, callback); | ||
@@ -151,0 +152,0 @@ } |
@@ -116,14 +116,4 @@ var nodeUtil = require("util"), | ||
case 'AFDate_FormatEx': | ||
var dateMask = funcParam.replace(/^'+|^"+|'+$|"+$/g,''); //mask value | ||
if (dateMask && dateMask.length <= 5) { | ||
if (dateMask.length === 5) { // default to mm/dd | ||
item.TName = 'mmdd'; | ||
} | ||
else if (dateMask.length === 4) { // default to yyyy | ||
item.TName = 'yyyy'; | ||
} | ||
} | ||
else { | ||
item.TName = 'date'; | ||
} | ||
item.TName = 'date'; | ||
item.MV = funcParam.replace(/^'+|^"+|'+$|"+$/g,''); //mask value | ||
break; | ||
@@ -130,0 +120,0 @@ case 'AFSpecial_KeystrokeEx': //special format: "arbitrary mask" |
{ | ||
"name": "pdf2json", | ||
"_id": "pdf2json@0.5.7", | ||
"version": "0.5.7", | ||
"_id": "pdf2json@0.5.8", | ||
"version": "0.5.8", | ||
"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": [ |
@@ -408,3 +408,3 @@ Introduction | ||
* ssn | ||
* date | ||
* date (tested date formatter: mm/dd/yyyy, mm/dd, mm/yyyy and Custom yyyy) | ||
* zip | ||
@@ -428,5 +428,3 @@ * phone | ||
v0.4.1 added more date format detection, these formats are set in Acrobat's field's Properties => Format => Date => Custom: | ||
* mmdd: 2 digit month and and 2 digit day in 'mm/dd' | ||
* yyyy: 4 digit year | ||
* date: mm/dd/year if other than mmdd and yyyy are detected | ||
@@ -433,0 +431,0 @@ Types above are detected only when the widget field type is "Tx" and the additional-actions dictionary 'AA' is set. Like what you see, not all pre-defined formatters and special formatters are supported, if you need more support, you can extend the 'processFieldAttribute' function in core.js file. |
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
3264303
35886
642