For the samples to work correctly, make sure that two conditions are met:
ONLYOFFICE Document Builder is installed into default directory "C:/Program Files/ONLYOFFICE/DocumentBuilder" on your computer.
Download one of the Builder C++ samples archive and unzip it into a folder with general editing access.
Each sample includes a code folder, an sln file, and a template file if the sample uses a template.
The code folder consists of a C++ program file and project files.
Please note that the path to the DocBuilder .dll file in the project file is set to default. You can change the path in the Sample.vcxproj.user file if DocBuilder is located in a different directory on your computer.
Include doctrenderer library C++ wrapper
Specify the paths to the Document Builder work directory, the result path (where the generated file will be saved), and the optional template path (if a template file will be used).
Create the main function (this function works with the DocBuilder methods to edit documents).
Initialize the DocBuilder from the working directory. After that Builder opens or creates a file so that Context, Scope and Global classes can be accessed.
Edit file using DocBuilder API methods. Use Call method with the name and params of the API method you call as an arguments.
Save and close file after editing, then call the Dispose method to destroy DocBuilder.
Open .sln file inside the sample folder to build the project.
Run the program when the project is built.
After program execution the result file will be saved to the result path. It's sample folder root by default.
Open result file and check the result.