Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
office-text-extractor
Advanced tools
office-text-extractor
Yet another library to extract text from MS Office (
docx
,pptx
,xlsx
) and PDF (
There are other great projects that do the same job and have inspired this project, such as:
This module uses some amazing existing libraries that perform better than the ones that originally existed in this module, and are therefore used instead:
This module also uses:
xml2js
- to convert the MS Office
XML files into JSONjs-yaml
- to convert JSON into YAMLfile-type
- to detect the mime
type of filesdecompress
- to unzip filesread-chunk
- to read chunks of
data from large filesA big thank you to the contributors of these projects!
Note
This package is now pure ESM (from version 2.0.0 onwards). Please read this article for a guide on how to ensure your project can import this library.
To use this in an Node project, install it using npm
/pnpm
/yarn
:
# Using npm
> npm install office-text-extractor
# Using pnpm
> pnpm add office-text-extractor
# Using yarn
> yarn add office-text-extractor
import { extractText } from 'office-text-extractor'
// Extract the text using `async-await`.
const text = await extractText('path/to/file')
console.log(text)
// Extract the text using Promises.
extractText('path/to/file')
.then((text) => console.log(text))
.catch((error) => console.error(error))
Note
There is no support for browser environments yet. If you want to add support, please feel free to open a pull request.
This project is licensed under the ISC license. Please see
license.md
for more details.
FAQs
Yet another library to extract text from MS Office and PDF files
The npm package office-text-extractor receives a total of 3,509 weekly downloads. As such, office-text-extractor popularity was classified as popular.
We found that office-text-extractor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.