{"_id":"xfdf","_rev":"11-c837bc78a4adad375ccd543bc12c9f93","name":"xfdf","description":"A Node.js JSON to XFDF generator","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"xfdf","version":"0.0.1","description":"A Node.js JSON to XFDF generator","main":"index.js","scripts":{"test":"node_modules/mocha/bin/mocha"},"repository":{"type":"git","url":"https://github.com/ScottONeal/xfdf.git"},"keywords":["pdf","xfdf","fdf","adobe"],"author":{"name":"Scott O'Neal"},"license":"MIT","bugs":{"url":"https://github.com/ScottONeal/xfdf/issues"},"homepage":"https://github.com/ScottONeal/xfdf","devDependencies":{"mocha":"^2.1.0","should":"^5.0.0","xml2js":"^0.4.5"},"dependencies":{"xmlbuilder":"^2.5.1"},"gitHead":"d1cf094e453133119bbc82b0713eda3671e14960","_id":"xfdf@0.0.1","_shasum":"e92eaf66cb655f986ae6cb90804cf1149e1129dd","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"scottsoneal","email":"scottmod@gmail.com"},"maintainers":[{"name":"scottsoneal","email":"scottmod@gmail.com"}],"dist":{"shasum":"e92eaf66cb655f986ae6cb90804cf1149e1129dd","tarball":"https://registry.npmjs.org/xfdf/-/xfdf-0.0.1.tgz","integrity":"sha512-kKcVtNgWOUFNCiOgmL5sg3Dx+Xy8tqR1XOrLC/P45QVufdtPXq4w6+DywSOIiHTjPkTHLWb0o5CGOk1fA+yfgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHxLoBaWh0gbV0eOS+Q68E610g5fSWsib+Ym06F+LP/WAiAKM5Tz8l5nUjVhF/6CCxkpbwtV7/O5Hl7j+UqprCsq7g=="}]},"directories":{}},"0.1.1":{"name":"xfdf","version":"0.1.1","description":"A Node.js JSON to XFDF generator","main":"index.js","scripts":{"test":"node_modules/mocha/bin/mocha"},"repository":{"type":"git","url":"https://github.com/ScottONeal/xfdf.git"},"keywords":["pdf","xfdf","fdf","adobe"],"author":{"name":"Scott O'Neal"},"license":"MIT","bugs":{"url":"https://github.com/ScottONeal/xfdf/issues"},"homepage":"https://github.com/ScottONeal/xfdf","devDependencies":{"mocha":"^2.1.0","should":"^5.0.0","xml2js":"^0.4.5"},"dependencies":{"lodash":"^3.2.0","xmlbuilder":"^2.5.1"},"gitHead":"a0d23f14e624f1d396777025ad0527dfbef4eefa","_id":"xfdf@0.1.1","_shasum":"2b720282fec28216d8d8a7eda54f99ee4496deac","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"scottsoneal","email":"scottmod@gmail.com"},"maintainers":[{"name":"scottsoneal","email":"scottmod@gmail.com"}],"dist":{"shasum":"2b720282fec28216d8d8a7eda54f99ee4496deac","tarball":"https://registry.npmjs.org/xfdf/-/xfdf-0.1.1.tgz","integrity":"sha512-FQyb/n6ZwSPzqEXacOxdYa4nsBrZWZE8xSEZuCt+GoWbTYhN14VsluUiqCV9x546JB4cK/hoIpjqn3/gRg7NJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5GXrUEbkPMx6cwwLt9TdpvAHxiajYgIowvcW0faRJHAiEA9xxmBGP25vykp3F2ZOQlQQA/yn6SCaeodUXunJL/KqI="}]},"directories":{}},"0.1.2":{"name":"xfdf","version":"0.1.2","description":"A Node.js JSON to XFDF generator","main":"index.js","scripts":{"test":"node_modules/mocha/bin/mocha"},"repository":{"type":"git","url":"git+https://github.com/ScottONeal/xfdf.git"},"keywords":["pdf","xfdf","fdf","adobe"],"author":{"name":"Scott O'Neal"},"license":"MIT","bugs":{"url":"https://github.com/ScottONeal/xfdf/issues"},"homepage":"https://github.com/ScottONeal/xfdf","devDependencies":{"mocha":"^2.1.0","should":"^5.0.0","xml2js":"^0.4.5"},"dependencies":{"lodash":"^3.2.0","xmlbuilder":"^2.5.1"},"gitHead":"6045f7e7a1458956b23241aecaca6b73511d483d","_id":"xfdf@0.1.2","_shasum":"fd5f12d063f13f717b16c21db1a9d75fca7d444d","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"scottsoneal","email":"scottmod@gmail.com"},"dist":{"shasum":"fd5f12d063f13f717b16c21db1a9d75fca7d444d","tarball":"https://registry.npmjs.org/xfdf/-/xfdf-0.1.2.tgz","integrity":"sha512-RjcK7+w0i/qO6wUVmsSV+kaPSu9QYjas1c0cO+ZTM/ppOLKA0jIyUYyQVQwLmi4xpySoZ4xrnIfESWDtB2NeQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICYwhW0K//HBDQRqedwXFVwwyWm11gy31WdDWtcWNLqaAiEAmVsfM2ErDFLQrqTbkP5xmWnw37Z0n5Ogm9ZritDJE9U="}]},"maintainers":[{"name":"scottsoneal","email":"scottmod@gmail.com"}],"directories":{}},"0.2.0":{"name":"xfdf","version":"0.2.0","description":"A Node.js JSON to XFDF generator","main":"index.js","scripts":{"test":"node_modules/mocha/bin/mocha"},"repository":{"type":"git","url":"git+https://github.com/ScottONeal/xfdf.git"},"keywords":["pdf","xfdf","fdf","adobe"],"author":{"name":"Scott O'Neal"},"license":"MIT","bugs":{"url":"https://github.com/ScottONeal/xfdf/issues"},"homepage":"https://github.com/ScottONeal/xfdf","devDependencies":{"mocha":"^2.1.0","should":"^5.0.0","xml2js":"^0.4.5"},"dependencies":{"lodash":"^3.2.0","xmlbuilder":"^2.5.1"},"gitHead":"84f203b22336e5470c2621d24b1e2bd3bd86bc52","_id":"xfdf@0.2.0","_shasum":"0a178aada1e76d1a5dcbb8bf1d509b036d2108f6","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"scottsoneal","email":"scottmod@gmail.com"},"dist":{"shasum":"0a178aada1e76d1a5dcbb8bf1d509b036d2108f6","tarball":"https://registry.npmjs.org/xfdf/-/xfdf-0.2.0.tgz","integrity":"sha512-6F26JfFikc2QGY7r02ERdXxY6pGKF+fkJ3+0oYt+XvUr06R1FNMdpH4KJH7UacCHMVwYjkpzIrHSo48o5Q4BoQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBKqUjaLRK5mSik56ciAORVwx6VZodNzKVPuG5ldfaucAiAcg5ryUXhr9WC8st84Mv7ypOc3g/e+AuZOFNCZm9D5Ew=="}]},"maintainers":[{"name":"scottsoneal","email":"scottmod@gmail.com"}],"directories":{}},"1.0.0":{"name":"xfdf","version":"1.0.0","description":"A Node.js JSON to XFDF generator","main":"index.js","scripts":{"test":"node_modules/mocha/bin/mocha"},"repository":{"type":"git","url":"git+https://github.com/ScottONeal/xfdf.git"},"keywords":["pdf","xfdf","fdf","adobe"],"author":{"name":"Scott O'Neal"},"license":"MIT","bugs":{"url":"https://github.com/ScottONeal/xfdf/issues"},"homepage":"https://github.com/ScottONeal/xfdf","devDependencies":{"mocha":"^6.0.1","should":"^5.0.0","xml2js":"^0.4.5"},"dependencies":{"lodash":"^4.17.11","xmlbuilder":"^11.0.0"},"gitHead":"5710765fc345f02438cca61fa74e631f96f6542c","_id":"xfdf@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"scottsoneal","email":"scottmod@gmail.com"},"dist":{"integrity":"sha512-jGPHeHgpepjp5yD08vD5PTpP8IM6qXDu7L+UwgwLRj0SKU9aRsBxH9v8iM8vJWQUL/gnUaEpUGai5aT0iyR92w==","shasum":"798d7e5bae9725afde373cf9272f042b7f1cb0be","tarball":"https://registry.npmjs.org/xfdf/-/xfdf-1.0.0.tgz","fileCount":8,"unpackedSize":15472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJccHLCCRA9TVsSAnZWagAAcaQP/2aUkipaazNmdME3rF/O\nefyYyQ5wKdNKjuU4q/KF2FVyyQP6+ZeUFkF+TJlrvx1yf7Od+PbOHrW95sg7\nYX+1TV0g4m7RoPiM3nGEulSs6Ot04jKE+I3ApnQfv9EDDZlne5pLeZnPdSzA\nOsQV1izvTXm0H+/GkPWg11TPooECKXFT5sRKKVtLd6HdZ3apZiVX+8LhDp0q\nl+OrrX5f7xmOdjrIIa7YFZvP/8ycUMI99SyjXPFQzngTXSi8UNLUmO8hf2Px\nJroQ3gBYLdeDk66cXvP74VErmW3JWxiXOavTQUgUS4Dgo17hHcMtDOExnE1N\nEH5l+ZYsYLyYvW4HFbmmyflLTSU+qXQz9SgiIRIglJhYl+Y9MkYZ1SRmKGnT\n2IFG4H/ztl6swyVn9coNEVl5/4dwT/w7w1LGYyGug04MDfQk435q/1887TPB\n/SLWb3pvyL1RMxyfatlYTdCW8TZ4QQF4/AmfE1rXmD1XwE1/43WtgAVCSA55\nnjojj3k0CL8dcJK1Rd4N0BqVivoTzDh4Xc9rw8XLOAgpnJu2+1ROni/9ksya\nT5apZlbUPA5hFV/+h+QfrYaF8oL5Hq8ArWV5FG8c9uT8XCMZFWj7yZ5x9271\nVcsQxS+Bpd1cON/xpo0SEFoZ2R9xe8nxP69taDsVC9JWXqSJmGHznt+BbtF3\nhyU6\r\n=H7z7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBE5dickfWfDqwPPa44rD0AQe/3Hn/CaRQF6uUDntokoAiEAy1SruzqjHeT1yMCFCZJmsANCFwJGA+y4h8N7SAFBS9k="}]},"maintainers":[{"name":"scottsoneal","email":"scottmod@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xfdf_1.0.0_1550873282262_0.3396001663610615"},"_hasShrinkwrap":false}},"readme":"# XFDF\nA Node.js module for creating Adobe XFDF files.\n\n[![Build Status](https://travis-ci.org/ScottONeal/xfdf.svg?branch=master)](https://travis-ci.org/ScottONeal/xfdf)\n\n## Installation\n```\nnpm install xfdf\n```\nAlways good to run tests\n```\nnpm test\n```\n\n#### Synoptic\n```\nvar xfdf = require('xfdf')\n\nvar builder = new xfdf({ pdf: 'Document.pdf' });\n\nbuilder.addField('firstname', 'John');\n\nconsole.log(builder.generate());\n```\n\ncalling generate() will create:\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xfdf xmlns=\"http://ns.adobe.com/xfdf/\" xml:space=\"preserve\">\n  <f href=\"Document.pdf\"/>\n  <fields>\n    <field name=\"firstname\">\n      <value>John</value>\n    </field>\n  </fields>\n</xfdf>\n```\n\n## Options\n\nWhen constructing an xfdf builder there are several options that can be passed.\n```\n  new xfdf({\n    pdf: 'path/to/document.pdf',\n    translateBools: true,\n    format: {\n      pretty: false,\n      indent: '  ',\n      newline: '\\r\\n'\n    }\n  });\n```\n\n#### pdf\nThis is the location of the template pdf to be refrenced in the xfdf document.\n\n#### translateBools\nThis will translate booleans in a javascript literal to 'Yes' or 'Off', which are used to flag checkboxes or radios in Adobe forms\n\n*default:* true\n\n#### format\nThis module uses [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js) to construct the xfdf xml document. xmlbuilder has several formating options which can be specified when creating the xml document. You can see those options [here](https://github.com/oozcitak/xmlbuilder-js/wiki#converting-to-string)\n\n*default:* \n```\n  pretty: true\n  indent: '  '\n  newline: '\\n'\n```\n\n## Methods\n\n#### addField('fieldname', 'fieldvalue')\n\nWill add a field to xfdf document.\nArgument should be a hash with two keys: name, value;\n```\n  builder.addField('FieldName', 'FieldValue');\n```\n\n#### fromJSON({data})\n\nYou can use this method to pass an entire javascript literal to be consumed by the XFDF builder.\nFormat of object should be:\n```\n  {\n    fields: {\n      age: 32,\n      tall: true,\n      name: 'John Doe'\n    }\n  }\n```\n\n#### fromJSONFile('path', callback)\n\nUsed to slurp a correctly formatted json file.\n\n**Usage:** *see test/resources/test.json for a properly formatted file.*\n```\n  builder.fromJSONFile('/path/to/data.json', function(err) {\n    if ( !err ) \n      builder.generate(); \n  });\n```\n","maintainers":[{"name":"scottsoneal","email":"scottmod@gmail.com"}],"time":{"modified":"2022-06-29T05:07:05.209Z","created":"2015-02-16T03:20:46.570Z","0.0.1":"2015-02-16T03:20:46.570Z","0.1.1":"2015-02-20T16:34:27.493Z","0.1.2":"2015-09-30T23:12:55.133Z","0.2.0":"2015-11-06T22:15:09.810Z","1.0.0":"2019-02-22T22:08:02.426Z"},"homepage":"https://github.com/ScottONeal/xfdf","keywords":["pdf","xfdf","fdf","adobe"],"repository":{"type":"git","url":"git+https://github.com/ScottONeal/xfdf.git"},"author":{"name":"Scott O'Neal"},"bugs":{"url":"https://github.com/ScottONeal/xfdf/issues"},"license":"MIT","readmeFilename":"README.md","users":{"scottsoneal":true}}