Add more documentation

This commit is contained in:
Dolan Miu
2019-08-06 17:15:45 +01:00
parent 4b19131dbd
commit 5a005365b2
2 changed files with 34 additions and 6 deletions

View File

@ -5,3 +5,17 @@
A section is a grouping of paragraphs that have a specific set of properties used to define the pages on which the text will appear. Properties include page size, page numbers, page orientation, headers, borders and margins.
For example, you could have one section which is portrait with a header and footer, and another section in landscape with no footer, and a header showing the current page number.
## Example
This creates a simple section in a document with one paragraph inside:
```ts
doc.addSection({
children: [
new Paragraph({
children: [new TextRun("Hello World")],
}),
],
});
```