Add demo for page break before
This commit is contained in:
14
demo/demo15.js
Normal file
14
demo/demo15.js
Normal 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!');
|
Reference in New Issue
Block a user