@extensionengine/rtf-parser
v1.0.1
Published
Parse RTF documents
Downloads
193
Keywords
Readme
@extensionengine/rtf-parser
Parse RTF documents
Installation
npm install @extensionengine/rtf-parser
CLI
Convert RTF document to plain text:
npx -p @extensionengine/rtf-parser rtf2txt <rtfdoc>
API
Table of Contents
parseRTF
Parse RTF document
Parameters
buffer
Buffer RTF document
Examples
const parseRTF = require('@extensionengine/rtf-parser');
const path = require('path');
const { readFileSync } = require('fs');
const rtf = readFileSync(path.join(__dirname, './reports/1110779471-20200721.rtf'));
parseRTF(rtf).then(rtfdoc => console.log({ rtfdoc }));
Returns Promise<RTFDocument> RTF document object
RTFDocument
Type: Object