add documentation on positioning units
See further discussions in #50, #191.
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
To create a new document, it is very easy:
|
To create a new document, it is very easy:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var doc = new docx.Document();
|
const doc = new docx.Document();
|
||||||
```
|
```
|
||||||
|
|
||||||
## Document properties
|
## Document properties
|
||||||
@ -13,7 +13,7 @@ var doc = new docx.Document();
|
|||||||
You can add properties to the Word document by specifying options, for example:
|
You can add properties to the Word document by specifying options, for example:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var doc = new docx.Document({
|
const doc = new docx.Document({
|
||||||
creator: "Dolan Miu",
|
creator: "Dolan Miu",
|
||||||
description: "My extremely interesting document",
|
description: "My extremely interesting document",
|
||||||
title: "My Document",
|
title: "My Document",
|
||||||
@ -22,14 +22,18 @@ var doc = new docx.Document({
|
|||||||
|
|
||||||
### Full list of options:
|
### Full list of options:
|
||||||
|
|
||||||
```
|
|
||||||
creator
|
* creator
|
||||||
description
|
* description
|
||||||
title
|
* title
|
||||||
subject
|
* subject
|
||||||
keywords
|
* keywords
|
||||||
lastModifiedBy
|
* lastModifiedBy
|
||||||
revision
|
* revision
|
||||||
```
|
|
||||||
|
|
||||||
You can mix and match whatever properties you want, or provide no properties.
|
You can mix and match whatever properties you want, or provide no properties.
|
||||||
|
|
||||||
|
### units for positioning
|
||||||
|
|
||||||
|
Various parts of the API require positioning arguments. The units are "20ths of a point" from the [OOXML](http://officeopenxml.com/index.php) specification.
|
||||||
|
See [Lars Corneliussen's blog post](https://startbigthinksmall.wordpress.com/2010/01/04/points-inches-and-emus-measuring-units-in-office-open-xml/) for more information and how to convert units.
|
Reference in New Issue
Block a user