You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

read-rtf

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-rtf

RTF to text/HTML util package; deprived from @keyrinrin/rtf-util

1.1.3
latest
npmnpm
Version published
Maintainers
1
Created
Source

rtf util

This is a util which can parse rtf file and convert it to html format. Support image and table convert. It may has some trouble in special character.

get started

const {RtfParser} = require("read-rtf");
const {RtfConverter} = require("read-rtf");

let parser = new RtfParser();
let converter = new RtfConverter();
let rtfGroup = parser.parse(temp);
let htmlContent converter.convert(rtfGroup)

text extraction

Basically this could be used to extract plain text from RTF document.

const fs = require('fs')
let qw = new RtfParser();
let rtfContent = fs.readFileSync('%MY_RTF_DOCUMENT%', "utf-8");
qw.parse(rtfContent);
const extractedText = qw.rawText;

warning

This is an experimental util, don't use in production environment.

Keywords

rtf

FAQs

Package last updated on 11 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts