Hi,
In my application I want to print a file from dropbox using my node application. Based on some parameters i want to add a watermark to the file i get from dropbox and then print it. So is there a way to get this file as a inputstream or something where i can add the watermark. or is there any feature that supports this/
const access_token = accessUser.dropboxAccessToken;
var dbx = new Dropbox({ accessToken: access_token });
if (ext=='docx' ||ext=='doc' ){
const docx = officegen('docx');
docx.on('finalize', function (written) {
console.log('Finished writing to Word document');
});
docx.on('error', function (err) {
console.log(err);
});
const pObj = docx.createP();
pObj.addText(watermarkText, {
font_face: 'Arial',
bold: true,
font_size: 24,
color: 'eeeeee'
});
// input stream is the read stream?
outputstream is the write stream
inputStream.pipe(docx).pipe(outputStream);
}