{"_id":"@affonsopga/html-to-rtf","name":"@affonsopga/html-to-rtf","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@affonsopga/html-to-rtf","version":"1.0.0","author":{"name":"Pedro Affonso Godinho de Alcântara","email":"pedro.affonso@directrad.com.br"},"contributors":[{"name":"Ozires R.S.O.F","email":"oziresrds@yahoo.com.br"},{"name":"Leon Strauß","email":"ls@visoma.de","url":"https://visoma.de"},{"name":"Heron Silva","email":"code.heron@outlook.com"},{"name":"Antonio Lucas Neres","email":"antoniolucasnobar@gmail.com"}],"description":"Convert html to rtf format","keywords":["html","rtf","document","rich text","convert","backend","javascript"],"license":"MIT","dependencies":{"cheerio":"^1.0.0-rc.6","image-type":"^4.1.0","juice":"^8.0.0","stream":"0.0.2","sync-request":"^6.1.0"},"devDependencies":{"gulp":"^4.0.2","gulp-mocha":"^7.0.2","mocha":"^8.2.0","should":"^13.2.3","webpack":"^4.46.0","webpack-cli":"^3.3.12"},"scripts":{"tests":"gulp tests","build":"webpack"},"repository":{"type":"git","url":"git://github.com/affonsopga/html-to-rtf.git"},"gitHead":"b8532997785c50ebe7810c8a5bf94f9ed091976f","bugs":{"url":"https://github.com/affonsopga/html-to-rtf/issues"},"homepage":"https://github.com/affonsopga/html-to-rtf#readme","_id":"@affonsopga/html-to-rtf@1.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-yqwojPH1zfxaUM1muX2eTWlebC6spKUNn+DieOCTxfglwInRNq3K1q/8qb1YOjk3vEwajPBqkr28fjguiXQL+w==","shasum":"7ac3ec9182e05c424698d6345446ae2bb56f6cf2","tarball":"https://registry.npmjs.org/@affonsopga/html-to-rtf/-/html-to-rtf-1.0.0.tgz","fileCount":19,"unpackedSize":40346,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEirTzOM8q1FTlppN6iNSEDeUiE4wFZ3zXv6meJ67rWrAiBlAQRBKqD7zhJvfvoR7V8RxVW9lCv7YJfVxMwbq/BdRw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuj4cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPfQ//Qk7MUwNMKlPi3kxdYnnZBmfkJC+cyyVLru7M8q+1Sco2rP7T\r\n3YiaNoqr7HAzNMq5QaEqxUAa5KJ3iuQh+2hMSnU64PLZIxlJ/ezcz7iRWApP\r\n7Mvd+E18xH/fD7LBJ0K1nEaOdO096kZYbx5GmVa6fVcBUDF84J9qb5BPlCH5\r\nDlZ6FmWO+dnZyaRHok7ImlqJxAPpS1lY8Bk7z4r+SYMsXL1g9r4eG4NgwCag\r\n8cqGCbf4b1rkNKKbde5+nQe6LuctK7wk+UtWX4bGIY19/F8XcwddPfkDD1Ql\r\nyjyantG7Tucgkb8nh0b4hbGMbPOTmTCUGN8HPbL3MS2Zk3ZCqgNUl6UBfUh1\r\nhMwpgc3mcEtXT57FLX9EcGCE1+L7NBFvMQKN2nxExFiB8cxJvVCXesNWih5g\r\nZ4RpvgPJWNGR0KIRdB0eqkYPqYpPasJK8VKXdCE2UjVhqv0PqymVHH3czx/M\r\nx7jUg5gvJz8XXTwc+FNIFdc1ao6LDJ1mnr4GlFKFpLObdFDcypqVGfElAmUb\r\n5q7IAeSmuCrAYsfqIABJyGiKnYVkQ1KS1gM3zRnsNZv2JjpU6CYQ4/rjAFca\r\n73P95Q+T/ZcpPnWCD0Bl+dWyn9Nu7XMt3y/Ef6GWP+mZphxHXInOrI0DOBRz\r\nPbCBLhZ7Gnm/Wty6OUFVoJEniYSSN/vWorU=\r\n=sUJ4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"affonsopga","email":"gohapao@gmail.com"},"directories":{},"maintainers":[{"name":"affonsopga","email":"gohapao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-to-rtf_1.0.0_1656372764074_0.2276217009799868"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-27T23:32:44.003Z","1.0.0":"2022-06-27T23:32:44.248Z","modified":"2022-06-27T23:32:44.435Z"},"maintainers":[{"name":"affonsopga","email":"gohapao@gmail.com"}],"description":"Convert html to rtf format","homepage":"https://github.com/affonsopga/html-to-rtf#readme","keywords":["html","rtf","document","rich text","convert","backend","javascript"],"repository":{"type":"git","url":"git://github.com/affonsopga/html-to-rtf.git"},"contributors":[{"name":"Ozires R.S.O.F","email":"oziresrds@yahoo.com.br"},{"name":"Leon Strauß","email":"ls@visoma.de","url":"https://visoma.de"},{"name":"Heron Silva","email":"code.heron@outlook.com"},{"name":"Antonio Lucas Neres","email":"antoniolucasnobar@gmail.com"}],"author":{"name":"Pedro Affonso Godinho de Alcântara","email":"pedro.affonso@directrad.com.br"},"bugs":{"url":"https://github.com/affonsopga/html-to-rtf/issues"},"license":"MIT","readme":"# HTML To RTF\n>This project convert html to rtf format in the browser. It is based on the oziresrds/html-to-rtf awesome project.\n>I looked into the 20+ forks to try get the best parts glued to in one place. This could be called html-to-rtf-frankenstein lol.\n\n> Highlight for the developers:\n* Ozires for the base framework. Without him, we would not have this.\n* Heron Silva for several improvements (as font-family support) (heronsilva / html-to-rtf)\n* wodka for making it possible to use in browser (wodka/html-to-rtf).\n* Leon Strauß for image support (MinePlay96/html-to-rtf).\n\nIf I missed some functionality in other forks, please let me know, or make a PR.\n\n## Prerequisites\n>This project work in the browser (maybe it works on the server side, but this is not the main goal.\n\n## Installation\n```\n$ npm install html-to-rtf-browser\n```\n## Getting Started\n```javascript\nconst HtmlToRtfBrowser = require('html-to-rtf-browser');\nvar htmlToRtf = new HtmlToRtfBrowser();\nvar html = `\n<h1>Title <span style=\"color:rgb(255,0,0);\">with</span> tag h1<h1>\n<p> start of an image (with width and height defined): </p>\n<img style=\"width: 5cm; height: 300px\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABdCAAAAAAeDx7VAAAAAmJLR0QA\n/4ePzL8AAAAJcEhZcwAACxIAAAsSAdLdfvwAAAGxSURBVFjD7dctdsMwDABgQcPCwMDCwsHAwsLCwcLeoLBHCMwRDAsHB3uMHCFQs52sP4llW7H33oDEmtZf/WxZcgD/IEBQQQUVVFBBOaFrqLvCaK8AQGWgt9oA7/MaH50y0ApcqNkj7flpOjqab/MyH/fen3LQhEf/ATUbXbdmc5quIHqeFvVlq/LR4fNXLYg+2Of+T3+yOFNZJ0rBMnez0asnd7NRKgQVVFBBw3Fr2vKouThciqO2RyWqjB61t+W4L4uOqrquQV/7+lw9WDVhrgu08lwNH6GVt3tGUaqXj3H2ds9MFPUO4lmwEFR0iJ1tHdwv8A0Jqy4L4M5B3ZDQiOn6c+CgODTmfjyEV+AeXnnwj9h+h9ULc6aIJ7tmKSeHg2K3MepXYRT7D5M1A5OKodhvfC9diyAKBbWJXVL1JAoFmRmHFJXILBJ1hyCmctGUo8VH3dEKpThiy0fd0Qo1Jfu2f+SiaAuH6sivTUHbeZM5iLqmRK9r5X/bj3ZTvQVoiBXoyVIVa9F3IFudqTu7dehYsqjQK9Gp1Xljj2tRfL6DzuI45KDcEFRQQQUVtEz8AL3L59EiRcoBAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA4LTIxVDA5OjE3OjE0KzAyOjAwSUJYdgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wOC0yMVQwOToxNzoxNCswMjowMDgf4MoAAAAASUVORK5CYII=\"></img>\n<p> end of an image</p>\n<div>\n\t<p style=\"color:#333; margin:5px;\" class=\"test\" align=\"center\">\n\t    text of paragraph <b>text with bold <i>text with italic and bold</i></b><i>text with italic</i>\n\t</p>\n\t<p style=\"color:rgb(255,0,0);\" align=\"right\">red paragraph => right with tag</p>\n\t<p style=\"color:rgb(0,0,255); text-align:center;\">blue paragraph => center with style</p>\n\t<table>\n\t\t<tbody>\n\t\t\t<tr>\n                <td><mark>column 1</mark></td>\n                <td>column 2</td>\n\t\t\t\t<td><mark>column 3</mark></td>\n\t\t\t\t<td>column 4</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>content 1</td>\n\t\t\t\t<td>content 2<br></td>\n\t\t\t\t<td>content 3<br></td>\n\t\t\t\t<td>content 4<br></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</div>\n`\nconst rtf = htmlToRtf.convertHtmlToRtf(html)\n// from here on, works only on browser\nconst blob = new Blob([rtf], {type: \"application/rtf;charset=utf-8\"});\nconst link=window.URL.createObjectURL(blob);\nwindow.location=link;\n\n```\n>  Now test in your preferred text editor (wordpad, word, libreoffice, ...).\n##\n\n##### Important:\n#\n> You can't copy the output of terminal or console.\n> Save the output at a file.rtf. See above for an example\n\n### Allowed html tags\n```html\n<b>, <br>, <center>, <div>, <em>, <font>, <h1>, <h2>, <h3>, <h4>,\n<h5>, <h6>, <i>, <li>, <mark>, <p>, <ol>, <s>, <span>, <sub>, <sup>,\n<strong>, <table>, <td>, <th>, <tr>, <u>, <ul>, <a>, <img> (PNG and JPG in base64 - experimental support to BMP - fixed size)\n```\n### Allowed style properties\n\n> color(Hex and Rgb), font-family, font-size(px/pt), text-align, text-indent (px/cm), margin-left (px/cm), padding-left (px/cm)\n\n> inside img tag: width and height (px/cm)\n\n## Running the tests\n```\n$ gulp tests\n```\n\n## Author\n\n> * **antoniolucasnobar**\n\n## License\nThis project is licensed under the MIT License\n","readmeFilename":"README.md"}