Comparing version 0.2.1 to 0.2.2
@@ -11,2 +11,4 @@ var nodeUtil = require("util"), | ||
var kFBANotOverridable = 0x00000400; // indicates the field is read only by the user | ||
// constructor | ||
@@ -119,3 +121,4 @@ var cls = function (field, viewport, Fields, Boxsets) { | ||
id: { Id: field.fullName, EN: 0}, | ||
TI: 0 | ||
TI: 0, | ||
AM: (field.Ff & 0x00000001) ? kFBANotOverridable : 0 | ||
}, _getFieldPosition.call(this, field)); | ||
@@ -122,0 +125,0 @@ }; |
{ | ||
"name": "pdf2json", | ||
"_id": "pdf2json@0.2.1", | ||
"version": "0.2.1", | ||
"_id": "pdf2json@0.2.2", | ||
"version": "0.2.2", | ||
"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": [ |
@@ -328,2 +328,6 @@ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
//MQZ. Apr.17.2013. TABLE 8.70 Field flags common to all field types | ||
//PDF Spec P.676. ReadOnly/Requires/NoExport flags | ||
item.Ff = annotation.get('Ff'); | ||
//PDF Spec p.651 get format dictionary | ||
@@ -330,0 +334,0 @@ var nVal = aa.get('F'); |
@@ -298,3 +298,3 @@ Introduction | ||
id: { | ||
Id: "p1-t4[0]", | ||
Id: "p1_t40", | ||
EN: 0 | ||
@@ -363,2 +363,22 @@ }, | ||
v0.2.2 added support for "field attribute mask", it'd be common for all fields, form author can set it in Acrobat Pro's Form Editing mode: if a field is ReadOnly, it's AM field will be set as 0x00000400, otherwise AM will be set as 0. Example: | ||
{ | ||
style: 48, | ||
T: { | ||
Name: "alpha", | ||
TypeInfo: { } | ||
}, | ||
id: { | ||
Id: "p1_t40", | ||
EN: 0 | ||
}, | ||
TI: 0, | ||
AM: 1024, //If (AM & 0x00000400) set, it indicates this is a read-only filed | ||
x: 6.19, | ||
y: 5.15, | ||
w: 30.94, | ||
h: 0.85 | ||
} | ||
Text Input Field Formatter Types | ||
@@ -531,5 +551,5 @@ ===== | ||
v0.1.15 added the capability to run pdf2json as command line tool, implemented in pdf2json.js file. It enables the use case that when running the parser as a web service is not absolutely necessary while transcoding local pdf files to JSON format is desired. Because in some use cases, the PDF files are relatively stable with less updates, even though parsing it in a web service, the parsing result will remain the same JSON payload. In this case, it's better to run pdf2json as a command line tool to pre-process those pdf files, and deploy the parsing result JSON files onto web server, client side JSON form renderer can work in the same way as before while eliminating server side process to achieve higher scalability. | ||
v0.1.15 added the capability to run pdf2json as command line tool. It enables the use case that when running the parser as a web service is not absolutely necessary while transcoding local pdf files to JSON format is desired. Because in some use cases, the PDF files are relatively stable with less updates, even though parsing it in a web service, the parsing result will remain the same JSON payload. In this case, it's better to run pdf2json as a command line tool to pre-process those pdf files, and deploy the parsing result JSON files onto web server, client side form renderer can work in the same way as before while eliminating server side process to achieve higher scalability. | ||
This command line capability is added as an extension, it doesn't break previous functionalities of running with a web service context. In my real project, I have a web service written in restify.js to run pdf2json with a RESTful web service interface, I also have the needs to pre-process some local static pdfs through the command line capability without changing the actual pdf2json module code. | ||
This command line utility is added as an extension, it doesn't break previous functionalities of running with a web service context. In my real project, I have a web service written in [restify.js to run pdf2json with a RESTful web service interface](https://github.com/modesty/p2jsvc), I also have the needs to pre-process some local static pdfs through the command line tool without changing the actual pdf2json module code. | ||
@@ -550,3 +570,16 @@ To use the command line utility to transcode a folder or a file: | ||
Run in a RESful Web Service | ||
###Note:### | ||
v0.2.1 added the ability to run pdf2json directly from the command line without specifying "node" and the path of pdf2json. To run this self-executable in command line, first install pdf2json globally: | ||
npm install pdf2json -g | ||
Then run it in command line: | ||
pdf2json -f [input directory or pdf file] | ||
or | ||
pdf2json -f [input directory or pdf file] -o [output directory] | ||
Run in a RESTful Web Service | ||
===== | ||
@@ -553,0 +586,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
29437947
29573
590