mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-12 11:40:28 +08:00
Update README.md
This commit is contained in:
23
README.md
23
README.md
@@ -40,11 +40,16 @@ go run cmd/main/main.go -u
|
|||||||
```
|
```
|
||||||
And you will see two files generated under `pwd` with the same contents as below.
|
And you will see two files generated under `pwd` with the same contents as below.
|
||||||
|
|
||||||
|
<table>
|
||||||
<center>
|
<tr>
|
||||||
<img width="566" alt="p1" src="https://user-images.githubusercontent.com/41315874/223348099-4a6099d2-0fec-4e13-92a7-152c00bc6f6b.png">
|
<td align="center"><img src="https://user-images.githubusercontent.com/41315874/223348099-4a6099d2-0fec-4e13-92a7-152c00bc6f6b.png"></td>
|
||||||
<img width="566" alt="p2" src="https://user-images.githubusercontent.com/41315874/223348157-a66fee27-313c-4fdb-b17d-b45032accdbd.png">
|
<td align="center"><img src="https://user-images.githubusercontent.com/41315874/223349486-e78ac0f1-c879-4888-9110-ea4db2590241.png"></td>
|
||||||
</center>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">p1</td>
|
||||||
|
<td align="center">p2</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
## Use Package in your Project
|
## Use Package in your Project
|
||||||
```bash
|
```bash
|
||||||
@@ -64,11 +69,11 @@ func main() {
|
|||||||
w := docx.NewA4()
|
w := docx.NewA4()
|
||||||
// add new paragraph
|
// add new paragraph
|
||||||
para1 := w.AddParagraph()
|
para1 := w.AddParagraph()
|
||||||
// add text
|
// add text
|
||||||
para1.AddText("test").AddTab()
|
para1.AddText("test").AddTab()
|
||||||
para1.AddText("size").Size("44").AddTab()
|
para1.AddText("size").Size("44").AddTab()
|
||||||
f, err := os.Create("generated.docx")
|
f, err := os.Create("generated.docx")
|
||||||
// save to file
|
// save to file
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user