{"maintainers":[{"name":"deployment","email":"mail@anowak.net"}],"dist-tags":{"latest":"0.3.1"},"author":{"name":"Artur Nowak","email":"artur.nowak@evidenceprime.com"},"description":"Converts HTML documents to DOCX in the browser","readme":"html-docx-js\n============\n\nThis is a very small library that is capable of converting HTML documents to DOCX format that\nis used by Microsoft Word 2007 and onward. It manages to perform the conversion in the browser by\nusing a feature called 'altchunks'. In a nutshell, it allows embedding content in a different markup\nlanguage. We are using MHT document to ship the embedded content to Word as it allows to handle images.\nAfter Word opens such file, it converts the external content to Word Processing ML (this\nis how the markup language of DOCX files is called) and replaces the reference.\n\nAltchunks were not supported by Microsoft Word for Mac 2008 and are not supported by LibreOffice and\nGoogle Docs.\n\nCompatibility\n-------------\n\nThis library should work on any modern browser that supports `Blobs` (either natively or via\n[Blob.js](https://github.com/eligrey/Blob.js/)). It was tested on Google Chrome 36, Safari 7 and\nInternet Explorer 10.\n\nIt also works on Node.js (tested on v0.10.12) using `Buffer` instead of `Blob`.\n\nImages Support\n-------------\n\nThis library supports only inlined base64 images (sourced via DATA URI). But it is easy to convert a\nregular image (sourced from static folder) on the fly. If you need an example of such conversion you can [checkout a demo page source](https://github.com/evidenceprime/html-docx-js/blob/master/test/sample.html) (see function `convertImagesToBase64`).\n\nUsage and demo\n--------------\n\nVery minimal demo is available as `test/sample.html` in the repository and\n[online](http://evidenceprime.github.io/html-docx-js/test/sample.html). Please note that saving\nfiles on Safari is a little bit convoluted and the only reliable method seems to be falling back\nto a Flash-based approach (such as [Downloadify](https://github.com/dcneiner/Downloadify)).\nOur demo does not include this workaround to keep things simple, so it will not work on Safari at\nthis point of time.\n\nYou can also find a sample for using it in Node.js environment\n[here](https://github.com/evidenceprime/html-docx-js-node-sample).\n\nTo generate DOCX, simply pass a HTML document (as string) to `asBlob` method to receive `Blob` (or `Buffer`)\ncontaining the output file.\n\n    var converted = htmlDocx.asBlob(content);\n    saveAs(converted, 'test.docx');\n\n`asBlob` can take additional options for controlling page setup for the document:\n\n* `orientation`: `landscape` or `portrait` (default)\n* `margins`: map of margin sizes (expressed in twentieths of point, see\n  [WordprocessingML documentation](http://officeopenxml.com/WPsectionPgMar.php) for details):\n    - `top`: number (default: 1440, i.e. 2.54 cm)\n    - `right`: number (default: 1440)\n    - `bottom`: number (default: 1440)\n    - `left`: number (default: 1440)\n    - `header`: number (default: 720)\n    - `footer`: number (default: 720)\n    - `gutter`: number (default: 0)\n\nFor example:\n\n    var converted = htmlDocx.asBlob(content, {orientation: 'landscape', margins: {top: 720}});\n    saveAs(converted, 'test.docx');\n\n**IMPORTANT**: please pass a complete, valid HTML (including DOCTYPE, `html` and `body` tags).\nThis may be less convenient, but gives you possibility of including CSS rules in `style` tags.\n\n`html-docx-js` is distributed as 'standalone' Browserify module (UMD). You can `require` it as\n`html-docx`. If no module loader is available, it will register itself as `window.htmlDocx`.\nSee `test/sample.html` for details.\n\nLicense\n-------\n\nCopyright (c) 2015 Evidence Prime, Inc.\nSee the LICENSE file for license rights and limitations (MIT).\n","repository":{"type":"git","url":"git://github.com/evidenceprime/html-docx-js.git"},"users":{"ncoop":true,"benoit.lathiere":true,"ks3sdk":true,"yonigoldberg":true,"ninjabryan":true,"sm1215":true},"bugs":{"url":"https://github.com/evidenceprime/html-docx-js/issues"},"license":"MIT","versions":{"0.1.0":{"name":"html-docx-js","version":"0.1.0","description":"Converts HTML documents to DOCX in the browser","main":"src/index.coffee","repository":{"type":"git","url":"git://github.com/evidenceprime/html-docx-js.git"},"scripts":{"test":"gulp test"},"browserify":{"transform":["coffeeify","brfs"]},"author":{"name":"Artur Nowak","email":"artur.nowak@evidenceprime.com"},"license":"MIT","devDependencies":{"brfs":"^1.1.2","browserify":"^4.2.0","chai":"^1.9.1","coffeeify":"^0.6.0","gulp":"^3.8.5","gulp-mocha":"^0.4.1","gulp-mocha-phantomjs":"^0.3.0","gulp-notify":"^1.4.0","gulp-util":"^2.2.19","mocha":"^1.20.1","pretty-hrtime":"^0.2.1","sinon":"^1.10.2","sinon-chai":"^2.5.0","vinyl-source-stream":"^0.1.1","watchify":"^0.10.2"},"dependencies":{"jszip":"^2.3.0"},"bugs":{"url":"https://github.com/evidenceprime/html-docx-js/issues"},"homepage":"https://github.com/evidenceprime/html-docx-js","_id":"html-docx-js@0.1.0","dist":{"shasum":"b91579ea94862950c017925e8134a1e689aece4e","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/html-docx-js/-/html-docx-js-0.1.0.tgz","integrity":"sha512-ne+Me3DtMTzs7z95pLvJzrnutGTql3tkdwbZBIx+QLAEjfBIfONZ2cHdtNKtfZYVTJwqfJRCSHyPXpyiWAQHyA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCekyANjuQ4mRystRt2XM6ZovhtfC2ilAGjYzuUxLAaUQIhAInZ77MxR0SFlrw0+aZ0hvS4l0OvlxPE9K8+9XDt9/wU"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"deployment","email":"mail@anowak.net"},"maintainers":[{"name":"deployment","email":"mail@anowak.net"}],"directories":{}},"0.2.0":{"name":"html-docx-js","version":"0.2.0","description":"Converts HTML documents to DOCX in the browser","main":"src/index.coffee","repository":{"type":"git","url":"git://github.com/evidenceprime/html-docx-js.git"},"scripts":{"test":"gulp test"},"browserify":{"transform":["coffeeify","brfs"]},"author":{"name":"Artur Nowak","email":"artur.nowak@evidenceprime.com"},"license":"MIT","devDependencies":{"brfs":"^1.1.2","browserify":"^4.2.0","chai":"^1.9.1","coffeeify":"^0.6.0","gulp":"^3.8.5","gulp-lodash-template":"^0.1.0","gulp-mocha":"^0.4.1","gulp-mocha-phantomjs":"^0.3.0","gulp-notify":"^1.4.0","gulp-util":"^2.2.19","jstify":"^0.9.0","mocha":"^1.20.1","pretty-hrtime":"^0.2.1","sinon":"^1.10.2","sinon-chai":"^2.5.0","vinyl-source-stream":"^0.1.1","watchify":"^0.10.2"},"dependencies":{"jszip":"^2.3.0","lodash.escape":"^3.0.0","lodash.merge":"^3.2.0"},"gitHead":"35118104ee731b40c93f10f7a21addaa676cb5be","bugs":{"url":"https://github.com/evidenceprime/html-docx-js/issues"},"homepage":"https://github.com/evidenceprime/html-docx-js","_id":"html-docx-js@0.2.0","_shasum":"e69c5fe86f9f7a21da6f95c0325da5e3ab1388cd","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"deployment","email":"mail@anowak.net"},"maintainers":[{"name":"deployment","email":"mail@anowak.net"}],"dist":{"shasum":"e69c5fe86f9f7a21da6f95c0325da5e3ab1388cd","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/html-docx-js/-/html-docx-js-0.2.0.tgz","integrity":"sha512-zP+tjT3rKZfONQK7ugMnBM5RzL/CPNz3X2wV8DV+wtOOFLKU3iHsSl44BLsvN2tpsaQiwc66ubErd/3hAu00dg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCz1MmnOEfNXgPmrYUUHQkbRbuZNGIHHoghOpeDko7XiQIgHFypyA2dZ4ZDaA8a2MozyxhVuvUzns0X9Fwbbx3BCdQ="}]},"directories":{}},"0.2.2":{"name":"html-docx-js","version":"0.2.2","description":"Converts HTML documents to DOCX in the browser","main":"build/api.js","repository":{"type":"git","url":"git://github.com/evidenceprime/html-docx-js.git"},"scripts":{"test":"gulp test-node","prepublish":"gulp clean; gulp build-node"},"browserify":{"transform":["coffeeify","brfs"]},"author":{"name":"Artur Nowak","email":"artur.nowak@evidenceprime.com"},"license":"MIT","devDependencies":{"brfs":"^1.1.2","browserify":"^4.2.0","chai":"^1.9.1","coffeeify":"^0.6.0","del":"^1.2.0","gulp":"^3.8.5","gulp-coffee":"^2.3.1","gulp-lodash-template":"^0.1.0","gulp-mocha":"^0.4.1","gulp-mocha-phantomjs":"^0.3.0","gulp-notify":"^1.4.0","gulp-util":"^2.2.19","jstify":"^0.9.0","mocha":"^1.20.1","pretty-hrtime":"^0.2.1","sinon":"^1.10.2","sinon-chai":"^2.5.0","vinyl-source-stream":"^0.1.1","watchify":"^0.10.2"},"dependencies":{"jszip":"^2.3.0","lodash.escape":"^3.0.0","lodash.merge":"^3.2.0"},"gitHead":"747cce265021b9b4bed3da8a2b40eea82b807128","bugs":{"url":"https://github.com/evidenceprime/html-docx-js/issues"},"homepage":"https://github.com/evidenceprime/html-docx-js#readme","_id":"html-docx-js@0.2.2","_shasum":"461660b81f0ece1c3cd37180a470474e7e665736","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.10.12","_npmUser":{"name":"deployment","email":"mail@anowak.net"},"dist":{"shasum":"461660b81f0ece1c3cd37180a470474e7e665736","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/html-docx-js/-/html-docx-js-0.2.2.tgz","integrity":"sha512-0N2yBhBVrgMei1PVzMc0BGC/MMr4FdKDHllucI57MooxfdxeuN6XRgYOn9Btu2mEiW/D5yTcoskkILX04IvCOA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFNk+YhdS+UnkvU8yW3ow1XioLiQCdnjHpCvqaaD+DoQIgdgic/SmGg6uygPu9WmJKyXmC+mXQz+Xff1rqD4Snq9I="}]},"maintainers":[{"name":"deployment","email":"mail@anowak.net"}],"directories":{}},"0.3.0":{"name":"html-docx-js","version":"0.3.0","description":"Converts HTML documents to DOCX in the browser","main":"build/api.js","repository":{"type":"git","url":"git://github.com/evidenceprime/html-docx-js.git"},"scripts":{"test":"gulp test-node","prepublish":"gulp clean; gulp build-node"},"browserify":{"transform":["coffeeify","brfs"]},"author":{"name":"Artur Nowak","email":"artur.nowak@evidenceprime.com"},"contributors":[{"name":"Ievgen Martynov","email":"ievgen.martynov@gmail.com"}],"license":"MIT","devDependencies":{"brfs":"^1.1.2","browserify":"^4.2.0","chai":"^1.9.1","coffeeify":"^0.6.0","del":"^1.2.0","gulp":"^3.8.5","gulp-coffee":"^2.3.1","gulp-lodash-template":"^0.1.0","gulp-mocha":"^0.4.1","gulp-mocha-phantomjs":"^0.3.0","gulp-notify":"^1.4.0","gulp-util":"^2.2.19","jstify":"^0.9.0","mocha":"^1.20.1","pretty-hrtime":"^0.2.1","sinon":"^1.10.2","sinon-chai":"^2.5.0","vinyl-source-stream":"^0.1.1","watchify":"^0.10.2"},"dependencies":{"jszip":"^2.3.0","lodash.escape":"^3.0.0","lodash.merge":"^3.2.0"},"gitHead":"34ddd05d1a9635638d397b3898f0d84955565ebc","bugs":{"url":"https://github.com/evidenceprime/html-docx-js/issues"},"homepage":"https://github.com/evidenceprime/html-docx-js#readme","_id":"html-docx-js@0.3.0","_shasum":"16719b138bba3e44f91c867c0621caf23f4472c7","_from":".","_npmVersion":"2.13.2","_nodeVersion":"0.10.38","_npmUser":{"name":"deployment","email":"mail@anowak.net"},"dist":{"shasum":"16719b138bba3e44f91c867c0621caf23f4472c7","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/html-docx-js/-/html-docx-js-0.3.0.tgz","integrity":"sha512-vHfZSMuXW2gHA7yLhRofeBO2IjzMmeKBuX19uZ/Ml6ckmDtqYYEjdWO/B4u9UFSA2sp4xN0CCg8ZtYOoCifuYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZd6le14/kk6KJgn1sqJF+gFh0DUDNfZtAt7HQ9WsJwAIgc+04LxG4idUrru+0UpLPyhxNRJvwEDRfon65iwmkRZ4="}]},"maintainers":[{"name":"deployment","email":"mail@anowak.net"}],"directories":{}},"0.3.1":{"name":"html-docx-js","version":"0.3.1","description":"Converts HTML documents to DOCX in the browser","main":"build/api.js","repository":{"type":"git","url":"git://github.com/evidenceprime/html-docx-js.git"},"scripts":{"test":"gulp test-node","prepublish":"gulp clean; gulp build-node"},"browserify":{"transform":["coffeeify","brfs"]},"author":{"name":"Artur Nowak","email":"artur.nowak@evidenceprime.com"},"contributors":[{"name":"Ievgen Martynov","email":"ievgen.martynov@gmail.com"}],"license":"MIT","devDependencies":{"brfs":"^1.1.2","browserify":"^4.2.0","chai":"^1.9.1","coffeeify":"^0.6.0","del":"^1.2.0","gulp":"^3.8.5","gulp-coffee":"^2.3.1","gulp-lodash-template":"^0.1.0","gulp-mocha":"^0.4.1","gulp-mocha-phantomjs":"^0.3.0","gulp-notify":"^1.4.0","gulp-util":"^2.2.19","jstify":"^0.9.0","mocha":"^1.20.1","pretty-hrtime":"^0.2.1","sinon":"^1.10.2","sinon-chai":"^2.5.0","vinyl-source-stream":"^0.1.1","watchify":"^0.10.2"},"dependencies":{"jszip":"^2.3.0","lodash.escape":"^3.0.0","lodash.merge":"^3.2.0"},"gitHead":"68f2235b2948419f1407e9b7788973715acf5d08","bugs":{"url":"https://github.com/evidenceprime/html-docx-js/issues"},"homepage":"https://github.com/evidenceprime/html-docx-js#readme","_id":"html-docx-js@0.3.1","_shasum":"9713f6587a08d1f0c87a801fe7649a4d0ab07d76","_from":".","_npmVersion":"2.13.2","_nodeVersion":"0.10.38","_npmUser":{"name":"deployment","email":"mail@anowak.net"},"dist":{"shasum":"9713f6587a08d1f0c87a801fe7649a4d0ab07d76","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/html-docx-js/-/html-docx-js-0.3.1.tgz","integrity":"sha512-QSrMiRhxesqxYCa3f+2Z3ttIHPzSjDOL1tCOmIDIEET7HdabxXND6tAbsFMXAgRG4RADQ3wbl74ydMmjidaDPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOITIaR/QF2PqFpbjAaIhyqTr9H/rjhgCahc5U3u7bSwIhANHoff9rrL5wcPbjj7X9DY/FEio9gHD9CgXSt52frelJ"}]},"maintainers":[{"name":"deployment","email":"mail@anowak.net"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/html-docx-js-0.3.1.tgz_1463496621496_0.5510821894276887"},"directories":{}}},"name":"html-docx-js","time":{"modified":"2022-06-18T21:52:01.444Z","created":"2014-07-31T16:16:56.808Z","0.1.0":"2014-07-31T16:16:56.808Z","0.2.0":"2015-04-23T12:26:47.193Z","0.2.1":"2015-05-21T08:36:48.196Z","0.2.2":"2015-05-21T08:56:50.952Z","0.3.0":"2015-09-17T09:57:36.635Z","0.3.1":"2016-05-17T14:50:22.288Z"},"readmeFilename":"README.md","contributors":[{"name":"Ievgen Martynov","email":"ievgen.martynov@gmail.com"}],"homepage":"https://github.com/evidenceprime/html-docx-js#readme"}