
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
file-convert
Advanced tools
The package export ppt, pptx, odp and key files to pdf and/or img(png, jpg, jpeg and etc...).
(new feature) disableExtensionCheck is true then converts any file(supported by libre office) to pdf or/and image(any format)
disableExtensionCheck is false then converts only .ppt .pptx .odp and .key file to pdf or/and image(png, jpg, jpeg and etc..)
Please install libreoffice, imagemagick and might required ghostscript for Mac os (Note: Please do restart your machine after installed all required software.)
###IMPORTANT
Make sure you install libreoffice to the USER you launch nodejs with and that this user HAS a home directory!
try to convert a file from inside that USER to properly test!
in case you install directly from libreoffice website,
MAKE SURE you use the ./install script that comes inside the tar.gz inside the USER!
libreOfficeInstallationPath --headless --convert-to pdf --outdir outputDir sourceFile(test.pdf),
Windows
C:\\Program Files\\LibreOffice\\program\\soffice.exe (or)
C:\\Program Files (x86)\\LibreOffice\\program\\soffice.exe (or)
C:\\Program Files (x86)\\LIBREO~1\\program\\soffice.exe
Ubuntu
/usr/bin/libreoffice (or)
/usr/bin/soffice
Mac OS
/Applications/LibreOffice.app/Contents/MacOS/soffice
convert -verbose -resize 1200 -density 200 test.pdf test-%d.png (%d inserts the images scene number)
// Import convert module
const document = require("file-convert");
const options = {
libreofficeBin: "C:\\Program Files\\LibreOffice\\program\\soffice.exe",
sourceFile: "C:\\convert-pdf-img\\sample.pptx", // .ppt, .pptx, .odp, .key and .pdf
outputDir: "C:\\convert-pdf-img\\output",
img: false,
imgExt: "jpg", // Optional and default value png
reSize: 800, // Optional and default Resize is 1200
density: 120, // Optional and default density value is 120
disableExtensionCheck: true, // convert any files to pdf or/and image
};
// Convert document to pdf and/or image
document
.convert(options)
.then((res) => {
console.log("res", res); // Success or Error
})
.catch((e) => {
console.log("e", e);
});
FAQs
The package export ppt, pptx, odp and key files to pdf and/or img(png, jpg, jpeg and etc...).
The npm package file-convert receives a total of 43 weekly downloads. As such, file-convert popularity was classified as not popular.
We found that file-convert demonstrated a not healthy version release cadence and project activity because the last version was released 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.