Skip to content

wuxianggujun/FeatherDoc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,186 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FeatherDoc

Windows MSVC CI Linux CMake CI macOS CMake CI

Simplified Chinese | English

FeatherDoc is a C++20 library for creating, reading, editing, inspecting, and rewriting Microsoft Word .docx files.

This README is intentionally short. Detailed API pages, workflows, release governance, PDF notes, and visual validation material live in the documentation site.

Documentation

What You Can Build

  • Create and edit .docx packages.
  • Edit paragraphs, runs, tables, rows, cells, styles, numbering, sections, headers, and footers.
  • Fill bookmarks and content controls by tag or alias.
  • Replace template slots with text, paragraphs, tables, rows, and images.
  • Inspect fields, hyperlinks, comments, footnotes, endnotes, revisions, images, styles, numbering, and semantic document differences.
  • Use featherdoc_cli for scriptable inspection and one-shot rewrites.

Quick Start

cmake -S . -B build
cmake --build build
cmake --install build --prefix install

Run the project-template smoke path that validates the Chinese invoice template, renders it from business JSON, and writes review artifacts:

powershell -ExecutionPolicy Bypass -File .\scripts\run_project_template_smoke.ps1 `
  -ManifestPath .\samples\project_template_smoke.manifest.json `
  -BuildDir .\build `
  -OutputDir .\output\project-template-smoke `
  -SkipBuild `
  -SkipVisualSmoke

Minimal C++ usage:

#include <featherdoc.hpp>

int main() {
    featherdoc::Document doc{"template.docx"};
    if (doc.open()) {
        return 1;
    }

    doc.body_template().replace_content_control_text_by_tag("customer", "Ada");
    return doc.save_as("output.docx") ? 1 : 0;
}

Branch Policy

  • dev is the active development branch.
  • master is kept as the stable/release branch.
  • Codex/local automation work should continue directly on the current dev branch by default. Do not create codex/* or other task branches unless the maintainer explicitly requests a new branch.
  • Release tags should be created only after version, changelog, CI, and release checks are aligned.

Support / GPT Access

Sponsor

If this project helps your work, you can support ongoing maintenance via the following support QR codes.

Alipay QR Code WeChat Appreciation QR Code

Left: Alipay. Right: WeChat Appreciation.

License

This fork should be described as source-available rather than open source for its fork-specific modifications. See LICENSE, LICENSE.upstream-mit, and NOTICE.

About

Modern C++ .docx library with MSVC support, Word visual validation, and existing-document editing APIs

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.upstream-mit

Contributing

Stars

11 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • PowerShell 51.6%
  • C++ 46.2%
  • CMake 2.0%
  • Other 0.2%