Installing Document Builder
ONLYOFFICE Document Builder can be installed on various platforms to generate, edit, and convert Office and PDF documents.
The free version of ONLYOFFICE Document Builder includes a watermark on all generated documents. To remove this limitation and access the full feature set, a commercial license is required.
For purchasing details, please contact us at sales@onlyoffice.com.
Prerequisites
- Python
- C++
- Java
- .Net
- Python 3.10 - 3.12
pip3. Make surepython3andpip3are installed in your system. You can check your Python version and pip3 version by using the command in the terminal:
python3 --version
python3 -m pip --version
Use pip and python for Windows. Make sure the executable name is python.exe (default on Windows) and Python is added to your path environment variable.
If you need to install them, you can use the following commands:
sudo apt install python3 python3-pip
You can install python3 and pip3 for macOS with Homebrew using the following command:
brew install python3
- Visual Studio for Windows
- GCC ≥ 4.2.1 (32-bit, 64-bit) or GCC ≥ 8 (64-bit ARM) for Linux
- GCC ≥ 4.2.1 for macOS
- JDK >= 5. Make sure that the JDK has been added to your
pathenvironment variable.
Installing
Download the SDK.
- Windows
- Linux
- macOS
- Download the Document Builder x64 or Document Builder x86 SDK archive.
- Extract the folder from the
.zipfile.
- Download the Document Builder aarch64 or Document Builder x86_64 SDK archive.
- Extract via
tar xvzf onlyoffice-documentbuilder-linux-aarch64.tar.xzortar xvzf onlyoffice-documentbuilder-linux-x86_64.tar.xz.
For example:
ARCH=$(uname -m)
if [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
FILE_NAME="onlyoffice-documentbuilder-linux-aarch64.tar.xz"
else
FILE_NAME="onlyoffice-documentbuilder-linux-x86_64.tar.xz"
fi
curl -L -o "$FILE_NAME" "https://github.com/ONLYOFFICE/DocumentBuilder/releases/latest/download/$FILE_NAME"
mkdir -p builder
tar xvJf "$FILE_NAME" -C builder
- Download the Document Builder arm64 or Document Builder x86_64 SDK archive.
- Extract via
tar xvzf onlyoffice-documentbuilder-macos-arm64.tar.xzortar xvzf onlyoffice-documentbuilder-macos-x86_64.tar.xz.
For example:
ARCH=$(uname -m)
if [[ "$ARCH" == "arm64" ]]; then
FILE_NAME="onlyoffice-documentbuilder-macos-arm64.tar.xz"
else
FILE_NAME="onlyoffice-documentbuilder-macos-x86_64.tar.xz"
fi
curl -L -o "$FILE_NAME" "https://github.com/ONLYOFFICE/DocumentBuilder/releases/latest/download/$FILE_NAME"
mkdir -p builder
tar xvJf "$FILE_NAME" -C builder
For Python, you can use pip3 to install the document-builder library in the terminal:
pip3 install document-builder
Run the samples
Download the document-builder samples:
git clone https://github.com/ONLYOFFICE/document-builder-samples
cd document-builder-samples
- Python
- C++ (VS)
- C++ (QT)
- Java
- .Net
-
Execute
configure.pywith--test python:python3 configure.py --test pythonProvide the directory to Document Builder with
--dirif necessary. It is needed for generating auxiliary module containing the path to Document Builder. -
Go to the test directory:
cd python/creating_basic_form -
Run the script:
python3 main.py
Documents will be created in the test directory.
NOTE: Only available on Windows.
-
Use
configure.pyto generate VS project files. For example:python configure.py --vs --test cpp/creating_basic_form --test cpp/creating_advanced_form -
Open the
.slnfile in Visual Studio. It will prompt you to retarget Windows SDK and VS toolset to your installed version – click "OK". -
The solution is ready to be built and run. Documents will be created in the project files directory.
-
Use
configure.pyto generate Qt project files. For example:python configure.py --qt --test cpp -
Open the
.profile in Qt Creator. -
The project is ready to be built and run. Documents will be created in the
builddirectory.
- Makefile
NOTE: Only available on Linux and macOS.
-
Use
configure.pyto generate Makefile. For example:python configure.py --make --test cpp/filling_spreadsheet -
Go to the directory with generated Makefile:
cd ../out/cpp/filling_spreadsheet -
Call:
makemakewill build and run the executable. Documents will be created in the same directory as Makefile is.
NOTE: JDK 8 or newer is required.
-
Go to the test directory:
cd java/creating_presentation -
Compile the
Program.javaproviding the path to docbuilder.jar located in the Document Builder directory:javac -cp "C:\Program Files\ONLYOFFICE\DocumentBuilder\docbuilder.jar" Program.java -
.classfile should appear in the directory. Run the program:java -cp "C:\Program Files\ONLYOFFICE\DocumentBuilder\docbuilder.jar;." ProgramNote that on UNIX systems the path separator is
:instead of;. Thus, on Linux or macOS it should be:java -cp "/opt/onlyoffice/documentbuilder/docbuilder.jar:." Program
Documents will be created in the test directory.
NOTE: Only available on Windows with Visual Studio and .NET SDK installed.
-
Use
configure.pyto generate VS project files. For example:python configure.py --vs --test cs -
Open the
.slnfile in Visual Studio. Depending on your installed .NET SDK version, you may need to set different target framework by setting it in Visual Studio project properties or editing it directly in the.csprojfile. -
The solution is ready to be built and run. Documents will be created in the project files directory.