diff --git a/demo/demo15.js b/demo/demo15.js new file mode 100644 index 0000000000..61d9351817 --- /dev/null +++ b/demo/demo15.js @@ -0,0 +1,14 @@ +const docx = require('../build'); + +var doc = new docx.Document(); + +var paragraph = new docx.Paragraph("Hello World"); +var paragraph2 = new docx.Paragraph("Hello World on another page").pageBreakBefore(); + +doc.addParagraph(paragraph); +doc.addParagraph(paragraph2); + +var exporter = new docx.LocalPacker(doc); +exporter.pack('My Document'); + +console.log('Document created successfully at project root!');