You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem with Powerpoint, Excel or Word document: Word
Steps to Reproduce
I used following codes to generate a test word in render process, e.g: render.js
const officegen = require('officegen');
var docx = officegen('docx');
var out = fs.createWriteStream(“c:\\temp\\test.docx”);
out.on('close', function() {
console.log(' stream closed');
})
var p = docx.createP({ align: 'left' });
p.addText('Title:', { font_size: 15 });
docx.generate(out);
Expected Behavior
A test.docx will be generated under c:\temp folder
Actual Behavior
File is genereated, no error occurppted and file size is zero, or if the file size is not zero, but cannot open it in Office Word.
I debugged my codes, seems the stream out event always cannot be rasied.
I also test same codes in main processs, e.g: main.js, it works well.. >_<
The text was updated successfully, but these errors were encountered:
Environment
node -v
: 13.14.0npm -v
: 6.14.4npm ls officegen
: 0.6.5Steps to Reproduce
I used following codes to generate a test word in render process, e.g: render.js
const officegen = require('officegen');
var docx = officegen('docx');
var out = fs.createWriteStream(“c:\\temp\\test.docx”);
out.on('close', function() {
console.log(' stream closed');
})
var p = docx.createP({ align: 'left' });
p.addText('Title:', { font_size: 15 });
docx.generate(out);
Expected Behavior
A test.docx will be generated under c:\temp folder
Actual Behavior
File is genereated, no error occurppted and file size is zero, or if the file size is not zero, but cannot open it in Office Word.
I debugged my codes, seems the stream out event always cannot be rasied.
I also test same codes in main processs, e.g: main.js, it works well.. >_<
The text was updated successfully, but these errors were encountered: