rtf2text

1.0.1 • Public • Published

rtf2text

This is a simplified RTF to text tool that just discards all RTF formatting from the document, and returns the document in plaintext.

const rtf2text = require('rtf2text')
const fs = require('fs')
 
parseRTF.string('{\\rtf1\\ansi\\b hi there\\b0}', (err, text) => {
  …
})
 
parseRTF.stream(fs.createReadStream('example.rtf'), (err, text) => {
  …
})

More info about the RTF parsing

Look at the rtf-parser module that this module is dependant upon. Thats where all the magic happens.

Package Sidebar

Install

npm i rtf2text

Weekly Downloads

102

Version

1.0.1

License

ISC

Unpacked Size

108 kB

Total Files

4

Last publish

Collaborators

  • haakon