🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@xoxoharsh/multiparser

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xoxoharsh/multiparser

A Text extracting package docx, pdf and pptx files

1.0.0
latest
Source
npm
Version published
Weekly downloads
2
Maintainers
0
Weekly downloads
 
Created
Source

MultiParser

A powerful npm package for parsing text from PowerPoint, PDF, and Word documents. This tool seamlessly extracts text, making it easier to analyze, process, and integrate with your applications.

Features

  • Parse text from PPT, PDF, and DOCX files
  • Easy-to-use API
  • High performance and accuracy
  • Supports multiple file formats
  • Lightweight and fast

Installation

Install the package via npm:

npm install @xoxoharsh/multiparser

Usage

Here's how to use the package in your project:

  • For parsing whole file:
import Parser from '@xoxoharsh/multiparser';

const parser = new Parser(filePath);

parser.extractAll().then((text) =>{
    console.log(text);
  }).catch((error) => {
    console.error("Error extracting text:", error);
  });
  • For parsing a particular page:
import Parser from '@xoxoharsh/multiparser';

const parser = new Parser(filePath);

parser
  .extractPage(pageNo)
  .then((text) => {
    console.log("Page 3 text:", text);
  })
  .catch((error) => {
    console.error("Error extracting text:", error);
  });

 // Currently this feature is not available for word documents

Contributing

We welcome contributions!

Keywords

parser

FAQs

Package last updated on 26 Dec 2024

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