
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
libreoffice-convert
Advanced tools
A simple and fast node.js module for converting office documents to different formats
A simple and fast node.js module for converting office documents to different formats.
Please install libreoffice in /Applications (Mac), with your favorite package manager (Linux), or with the msi (Windows)
(On Windows, add PROGRAMFILES
environment variable for Windows program files path to your local project)
'use strict';
const path = require('path');
const fs = require('fs').promises;
const libre = require('libreoffice-convert');
libre.convertAsync = require('util').promisify(libre.convert);
async function main() {
const ext = '.pdf'
const inputPath = path.join(__dirname, '/resources/example.docx');
const outputPath = path.join(__dirname, `/resources/example${ext}`);
// Read file
const docxBuf = await fs.readFile(inputPath);
// Convert it to pdf format with undefined filter (see Libreoffice docs about filter)
let pdfBuf = await libre.convertAsync(docxBuf, ext, undefined);
// Here in done you have pdf file which you can save or transfer in another stream
await fs.writeFile(outputPath, pdfBuf);
}
main().catch(function (err) {
console.log(`Error converting file: ${err}`);
});
FAQs
A simple and fast node.js module for converting office documents to different formats
The npm package libreoffice-convert receives a total of 71,925 weekly downloads. As such, libreoffice-convert popularity was classified as popular.
We found that libreoffice-convert 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.