From bcd6110578996493b7ff56a5a924064180b7aff7 Mon Sep 17 00:00:00 2001 From: Dolan Date: Mon, 28 May 2018 02:27:46 +0100 Subject: [PATCH] Add demo for page break before --- demo/demo15.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 demo/demo15.js 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!');