Deploy dolanmiu/docx to github.com/dolanmiu/docx.git:gh-pages

This commit is contained in:
Deployment Bot (from Travis CI)
2019-10-10 20:31:32 +00:00
parent 080c8acb0f
commit 11a2e5b14f
419 changed files with 4492 additions and 15842 deletions

View File

@ -248,10 +248,15 @@ The above example will create a heading with a page break directly under it.
## Page Break
To move to a new page (insert a page break), simply add `.pageBreak()` on a paragraph:
To move to a new page (insert a page break):
```ts
const paragraph = new docx.Paragraph("Amazing Heading").pageBreak();
const paragraph = new docx.Paragraph({
children: [
new TextRun("Amazing Heading"),
new PageBreak(),
]
});
```
The above example will create a heading and start a new page immediately afterwards.