Merge pull request #75 from h4buli/feature/page-break-before

paragraph: add support for 'page break before' format property
This commit is contained in:
Dolan
2018-05-28 02:33:59 +01:00
committed by GitHub
5 changed files with 56 additions and 2 deletions

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