This commit is contained in:
Dolan
2019-10-10 01:25:37 +01:00
parent 2bb7e08ade
commit 3b289be5ce

View File

@ -1,12 +1,12 @@
// Multiple sections and headers
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Footer, Header, Packer, PageNumberFormat, PageOrientation, Paragraph, TextRun } from "../build";
import { Document, Footer, Header, Packer, PageBreak, PageNumberFormat, PageOrientation, Paragraph, TextRun } from "../build";
const doc = new Document();
doc.addSection({
children: [new Paragraph("Hello World").pageBreak()],
children: [new Paragraph("Hello World"), new PageBreak()],
});
doc.addSection({