From 249e44532f20e8d5e7503a8518deec0135d5af09 Mon Sep 17 00:00:00 2001 From: Eli Flanagan Date: Tue, 11 Dec 2018 16:49:18 -0500 Subject: [PATCH] add documentation on positioning units See further discussions in #50, #191. --- docs/usage/document.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/usage/document.md b/docs/usage/document.md index f874502d3c..175e4ecad1 100644 --- a/docs/usage/document.md +++ b/docs/usage/document.md @@ -5,7 +5,7 @@ To create a new document, it is very easy: ```js -var doc = new docx.Document(); +const doc = new docx.Document(); ``` ## Document properties @@ -13,7 +13,7 @@ var doc = new docx.Document(); You can add properties to the Word document by specifying options, for example: ```js -var doc = new docx.Document({ +const doc = new docx.Document({ creator: "Dolan Miu", description: "My extremely interesting document", title: "My Document", @@ -22,14 +22,18 @@ var doc = new docx.Document({ ### Full list of options: -``` -creator -description -title -subject -keywords -lastModifiedBy -revision -``` + +* creator +* description +* title +* subject +* keywords +* lastModifiedBy +* revision 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. \ No newline at end of file