Skip to content

C++ library for creating and updating Microsoft Word (.docx) files.

License

Notifications You must be signed in to change notification settings

CihanSari/DuckX

 
 

Repository files navigation

Build Status

DuckX

DuckX is a library for creation of Office docx files

DuckX helps you to work with docx files quickly in C++.

Status

  • Documents (docx) [Word]
    • Read/Write/Edit

Quick Start

Here's an example of how to use duckx to read a docx file; It opens a docx file named file.docx and goes over paragraphs and runs and prints them:

#include <iostream>
#include <duckx.hpp>

int main() {

    duckx::Document doc("file.docx");   

    doc.open();

    for (auto p = doc.paragraphs(); p.has_next() ; p.next()) {
	for (auto r = p.runs(); r.has_next(); r.next()) {
            std::cout << r.get_text() << std::endl;
        }
    }
}

Note that you must use -lduckx flag to compile your cpp file
For example:

g++ sample1.cpp -lduckx

Install

It's easy as pie!

Compiling

The preferred way is to create a build folder

git clone https://github.com/amiremohamadi/DuckX.git
cd DuckX
mkdir build
cd build
cmake ..
cmake --build .

Requirements

Licensing

This library is available to anybody free of charge, under the terms of MIT License (see LICENSE.md).

About

C++ library for creating and updating Microsoft Word (.docx) files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 69.6%
  • C 30.2%
  • CMake 0.2%