Added differentFirstPageHeader section property

This commit is contained in:
Tyler Bell
2018-05-17 11:45:06 -06:00
parent 7968c1efcf
commit 6c2eb882bb
3 changed files with 10 additions and 9 deletions

View File

@ -1,15 +1,15 @@
const docx = require('../build');
var doc = new docx.Document();
var doc = new docx.Document(undefined,{differentFirstPageHeader:true});
doc.createParagraph("First Page").pageBreak()
doc.createParagraph("Second Page");
var pageoneheader = new docx.Paragraph("Running head: My Title").maxRightTabStop();
var tab = new docx.TextRun().tab()
var pageNumber = new docx.TextRun().pageNumber()
var pageoneheader = new docx.Paragraph("Running head: My Title").maxRightTabStop();
pageoneheader.addRun(tab);
pageoneheader.addRun(pageNumber);
doc.firstPageHeader.addParagraph(pageoneheader);