UNPKG

@groupdocs/groupdocs.watermark

Version:

Create and apply watermarks on PDF, Word, Excel, PowerPoint, and image files, including JPG and PNG. Fast, powerful, and easy-to-use watermarking tool.

25 lines (22 loc) 815 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-watermark-nodejs-25.6.jar'))) { console.warn('\x1b[33m%s\x1b[0m', `File groupdocs-watermark-nodejs-25.6.jar not found in the lib directory.\nPlease navigate to the package directory:`); console.log('\n cd node_modules/@groupdocs/groupdocs.watermark\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.watermark"); } })()