{"id":37207289,"url":"https://github.com/didikprabowo/mbadocx","last_synced_at":"2026-01-14T23:50:36.971Z","repository":{"id":311208930,"uuid":"1031150429","full_name":"didikprabowo/mbadocx","owner":"didikprabowo","description":"Go library for programmatically creating and manipulating Microsoft Word (DOCX) documents","archived":false,"fork":false,"pushed_at":"2025-08-22T19:35:47.000Z","size":142,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-22T21:14:20.507Z","etag":null,"topics":["document","docx","golang","golang-library","openoffice","word","xml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/didikprabowo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-03T05:48:33.000Z","updated_at":"2025-08-22T19:35:50.000Z","dependencies_parsed_at":"2025-08-22T21:15:23.119Z","dependency_job_id":"6d2ca5bb-0dd4-467c-9925-8b7fcc9cee80","html_url":"https://github.com/didikprabowo/mbadocx","commit_stats":null,"previous_names":["didikprabowo/mbadocx"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/didikprabowo/mbadocx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didikprabowo%2Fmbadocx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didikprabowo%2Fmbadocx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didikprabowo%2Fmbadocx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didikprabowo%2Fmbadocx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didikprabowo","download_url":"https://codeload.github.com/didikprabowo/mbadocx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didikprabowo%2Fmbadocx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["document","docx","golang","golang-library","openoffice","word","xml"],"created_at":"2026-01-14T23:50:36.418Z","updated_at":"2026-01-14T23:50:36.954Z","avatar_url":"https://github.com/didikprabowo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./mbadocx.svg\" alt=\"Mbadocx - Go DOCX Library\" width=\"250\"\u003e\n  \n  **Go library for creating, reading and manipulating DOCX files**\n  \n  ![Go Version](https://img.shields.io/badge/Go-1.16+-00ADD8)\n [![Go Reference](https://pkg.go.dev/badge/github.com/didikprabowo/mbadocx.svg)](https://pkg.go.dev/github.com/didikprabowo/mbadocx)\n  [![Go Report Card](https://goreportcard.com/badge/github.com/didikprabowo/mbadocx)](https://goreportcard.com/report/github.com/didikprabowo/mbadocx)\n  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n  \n\u003c/div\u003e\n\n## Overview\n\n**Mbadocx** is a Go library for programmatically creating and manipulating Microsoft Word (DOCX) documents.  \nIt provides a modular, extensible API for generating Word documents with advanced formatting, metadata, and resource management.\n\n### Key Features\n\n- ✅ **Document Creation** - Create new DOCX documents from scratch\n- ✅ **Text Formatting** - Bold, italic, colors, font sizes\n- ✅ **Paragraphs** - Full paragraph management and styling\n- ✅ **Tables** - Create and format tables with rows and cells\n- ✅ **Image** - Add image and set properties\n- ✅ **Hyperlinks** - Add clickable links to documents\n- ✅ **Line Breaks** - Control document flow\n- ✅ **Fluent API** - Chainable methods for clean code\n- ✅ **Pure Go** - No external dependencies required\n\n### Examples\n- [Basic Document](./example/basic)\n- [List Numbering](./example/list)\n- [Text Formating](./example/text-formatting)\n- [Tables](./example/table)\n- [Image](./example/image)\n\n### Why mbadocx?\n\n- Idiomatic Go - Follows Go best practices and conventions\n- Lightweight - Minimal overhead and dependencies\n- Extensible - Modular architecture for easy extension\n- MIT Licensed - Use freely in commercial and open-source projects\n\n## Installation\n\n### Requirements\n- Go 1.16 or higher\n- No external dependencies required\n\n### Install via go get\n\n```bash\ngo get github.com/didikprabowo/mbadocx\n```\n\n### Import in your code\n\n```go\nimport \"github.com/didikprabowo/mbadocx\"\n```\n\n## Quick Start\n\nHere's a simple example to get you started:\n\n```go\npackage main\n\nimport (\n    \"log\"\n    \"github.com/didikprabowo/mbadocx\"\n)\n\nfunc main() {\n    // Create a new document\n    doc := mbadocx.New()\n    \n    // Add a paragraph with formatted text\n    para := doc.AddParagraph()\n    para.AddText(\"Hello, World!\").SetBold(true).SetFontSize(16)\n    \n    // Save the document\n    if err := doc.Save(\"hello.docx\"); err != nil {\n        log.Fatal(err)\n    }\n}\n```\n\n### Creating Tables\n\n```go\npackage main\n\nimport (\n    \"log\"\n\n    \"github.com/didikprabowo/mbadocx\"\n    \"github.com/didikprabowo/mbadocx/elements\"\n)\n\nfunc main() {\n    doc := mbadocx.New()\n    // Add title\n    doc.AddHeading(\"Table Examples in mbadocx\", 1)\n    doc.AddParagraph().AddText(\"This document demonstrates various table features.\")\n\n    // Example 1: Simple table\n    doc.AddHeading(\"Example 1: Basic Table\", 2)\n    doc.AddParagraph().AddText(\"A simple 3x3 table:\")\n\n    table1 := doc.AddTable(3, 3)\n    if table1 != nil {\n        // Add headers\n        table1.SetCellFormattedText(0, 0, \"Name\", func(r *elements.Run) {\n            r.SetSpacing(2)\n            r.SetBold(true)\n        })\n        table1.SetCellFormattedText(0, 1, \"Age\", func(r *elements.Run) {\n            r.SetBold(true)\n        })\n        table1.SetCellFormattedText(0, 2, \"City\", func(r *elements.Run) {\n            r.SetBold(true)\n        })\n\n        // Add data\n        table1.SetCellText(1, 0, \"John Doe\")\n        table1.SetCellText(1, 1, \"30\")\n        table1.SetCellText(1, 2, \"New York\")\n\n        table1.SetCellText(2, 0, \"Jane Smith\")\n        table1.SetCellText(2, 1, \"25\")\n        table1.SetCellText(2, 2, \"London\")\n\n        // Set table properties\n        table1.SetTableAlignment(\"center\")\n    }\n\n    // Save the document\n    if err := doc.Save(\"testdata/table_examples.docx\"); err != nil {\n        log.Fatalf(\"Failed to save document: %v\", err)\n    }\n}\n```\n\n### Adding Images\n\n```go\npackage main\n\nimport (\n    \"log\"\n\n    \"github.com/didikprabowo/mbadocx\"\n    \"github.com/didikprabowo/mbadocx/properties\"\n)\n\nfunc main() {\n    docx := mbadocx.New()\n    docx.AddParagraph().AddText(\"Image with Borders and Effects\")\n\n    img1, err := docx.AddImage(\"mbadocx_logo.png\")\n    if err != nil {\n        log.Fatal(\"failed add image\")\n    }\n\n    img1.\n        SetBorder(3, \"#FF0000\").\n        SetAlignment(properties.AlignCenter)\n\n        if err :=  docx.Save(\"testdata/image.docx\"); err != nil {\n        log.Fatalf(\"Failed to save document: %v\", err)\n    }\n}\n```\n\n\n## Contributing\n\nContributions are welcome!  \nPlease see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.\n\n---\n\n## License\n\nMIT License. See [LICENSE](./LICENSE) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidikprabowo%2Fmbadocx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidikprabowo%2Fmbadocx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidikprabowo%2Fmbadocx/lists"}