Add demo for page break before

This commit is contained in:
Dolan
2018-05-28 02:27:46 +01:00
parent c9eb27de11
commit bcd6110578

14
demo/demo15.js Normal file
View File

@ -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!');