Getting Started

This page is the English quick-start path for the /en/ documentation tree.

Install And Build

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

Top-level builds enable BUILD_CLI by default, so featherdoc_cli is built unless -DBUILD_CLI=OFF is passed explicitly.

PDF support is experimental and opt-in. Build FEATHERDOC_BUILD_PDF and FEATHERDOC_BUILD_PDF_IMPORT only when you need the PDF workflow pages and CLI entry points.

Installed CMake consumers should request the Word/Core component explicitly:

find_package(FeatherDoc CONFIG REQUIRED COMPONENTS Core)
target_link_libraries(my_app PRIVATE FeatherDoc::Core)

Word is an equivalent component name for Core. When the PDF writer is enabled and FreeType, ZLIB, PNG, plus optional HarfBuzz all come from discoverable CMake packages, the install also exports the Pdf component:

find_package(FeatherDoc CONFIG REQUIRED COMPONENTS Core Pdf)
target_link_libraries(my_app PRIVATE FeatherDoc::Pdf)

Consume Pdf with the same dependency environment or toolchain used to build FeatherDoc. Requesting only Core / Word does not discover any PDF dependencies. A writer built with repository fallback dependencies remains build-tree-only. Requesting an unavailable Pdf or PdfImport component fails during configuration instead of presenting headers without a linkable implementation.

Minimal C++ Usage

#include <featherdoc.hpp>

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

    doc.paragraphs().add_run("Generated by FeatherDoc");
    return doc.save_as("output.docx") ? 1 : 0;
}

Where To Go Next