Files
docx-js/docs/examples.md
2018-08-05 04:24:04 +01:00

60 lines
1.6 KiB
Markdown

# Examples
> All examples can run independently and can be found in the `/demo` folder of the project
## Simple
A simple hello world of the `docx` library:
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo1.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo1.js*
## Styles
This example shows how to customise the look and feel of a document using JS configuration
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo2.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo2.js*
## Numbering
This example shows many levels of numbering
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo3.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo3.js*
## Table
Example of simple table
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo4.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo4.js*
## Images
Importing Images from file system path
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo5.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo5.js*
## Margins
Example showing how to set custom margains
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo6.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo6.js*
## Orientation
Example showing how to set the document to `landscape` or `portrait`
[Example](https://raw.githubusercontent.com/dolanmiu/docx/master/demo/demo7.js ':include')
*Source: https://github.com/dolanmiu/docx/blob/master/demo/demo7.js*