Comparing version 0.4.0 to 0.4.1
@@ -99,2 +99,3 @@ var nodeUtil = require("util"), | ||
return; | ||
var funcName = vParts[0]; | ||
@@ -116,3 +117,14 @@ var funcParam = vParts[1].split(')')[0]; | ||
case 'AFDate_FormatEx': | ||
item.TName = 'date'; | ||
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'; | ||
} | ||
break; | ||
@@ -119,0 +131,0 @@ case 'AFSpecial_KeystrokeEx': //special format: "arbitrary mask" |
{ | ||
"name": "pdf2json", | ||
"_id": "pdf2json@0.4.0", | ||
"version": "0.4.0", | ||
"_id": "pdf2json@0.4.1", | ||
"version": "0.4.1", | ||
"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": [ |
@@ -414,4 +414,9 @@ Introduction | ||
About 5 types 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. | ||
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 | ||
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. | ||
For the supported types, the result data is set to the field item's T object. Example of a 'number' field in final JSON output: | ||
@@ -418,0 +423,0 @@ |
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
3256237
35732
618