UNPKG

@groupdocs/groupdocs.conversion

Version:

Document conversion API for Node.js (powered by Java) to convert back and forth between the most popular document and image formats, including PDF, Word, Excel, PowerPoint, OpenDocument documents, e-mail messages, images and many more in one package.

25 lines (22 loc) 821 B
const fs = require('fs'); const path = require('path'); (() => { function checkFileExists(filePath) { try { fs.accessSync(filePath, fs.constants.F_OK); return true; } catch { return false; } } if (!checkFileExists(path.join(__dirname, 'lib/groupdocs-conversion-nodejs-25.11.jar'))) { console.warn('\x1b[33m%s\x1b[0m', `File groupdocs-conversion-nodejs-25.11.jar not found in the lib directory.\nPlease navigate to the package directory:`); console.log('\n cd node_modules/@groupdocs/groupdocs.conversion\n'); console.warn('\x1b[33m%s\x1b[0m', `Then download the JAR file using the command:`); console.log('\n npm run postinstall\n'); process.exit(0) } else { module.exports = require("./lib/groupdocs.conversion"); } })()