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 surepython3
andpip3
are 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
path
environment variable.
Installing
Download the SDK.
- Windows
- Linux
- macOS
- Download the Document Builder x64 or Document Builder x86 SDK archive.
- Extract the folder from the
.zip
file.
- Download the Document Builder aarch64 or Document Builder x86_64 SDK archive.
- Extract via
tar xvzf onlyoffice-documentbuilder-8.3.2-14-linux-aarch64.tar.xz
ortar xvzf onlyoffice-documentbuilder-8.3.2-14-linux-x86_64.tar.xz
.
- Download the Document Builder arm64 or Document Builder x86_64 SDK archive.
- Extract via
tar xvzf onlyoffice-documentbuilder-8.3.2-14-macos-arm64.tar.xz
ortar xvzf onlyoffice-documentbuilder-8.3.2-14-macos-x86_64.tar.xz
.
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.py
with--test python
:
python3 configure.py --test python
Provide the directory to Document Builder with --dir
if 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.py
to generate VS project files. For example:python configure.py --vs --test cpp/creating_basic_form --test cpp/creating_advanced_form
-
Open the
.sln
file 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.py
to generate Qt project files. For example:python configure.py --qt --test cpp
-
Open the
.pro
file in Qt Creator. -
The project is ready to be built and run. Documents will be created in the
build
directory.
- Makefile
NOTE: Only available on Linux and macOS.
-
Use
configure.py
to 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:
make
make
will 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.java
providing the path to docbuilder.jar located in the Document Builder directory:javac -cp "C:\Program Files\ONLYOFFICE\DocumentBuilder\docbuilder.jar" Program.java
-
.class
file should appear in the directory. Run the program:java -cp "C:\Program Files\ONLYOFFICE\DocumentBuilder\docbuilder.jar;." Program
Note 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.py
to generate VS project files. For example:python configure.py --vs --test cs
-
Open the
.sln
file 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.csproj
file. -
The solution is ready to be built and run. Documents will be created in the project files directory.