Get Started
Documentation

ONLYOFFICE Document Builder integration API

When you integrate ONLYOFFICE Document Builder into your own application, there are two ways this can be done:

  1. In case your application is a C++ one, you can embed the code for ONLYOFFICE Document Builder together with the script code for the document files to be created into your application. In this case you will need to recompile your application each time anything is to be changed in the output document files. This option is good when you need a faster native application and you are sure that the resulting document files will always stay the same or will only be changed when you recompile your application anyway.

    For the integration of ONLYOFFICE Document Builder into any application, the C++ doctrenderer library is used. The current application version contains two main classes for the doctrenderer library:

    • CDoctrenderer class - used by ONLYOFFICE Document Builder in the file conversion process.
    • CDocBuilder class - used by ONLYOFFICE Document Builder for the document file (text document, spreadsheet, PDF) to be generated.

    Visit the CDocBuilder class section to find out more about the methods used for the ONLYOFFICE Document Builder integration using this option and for the C++ example.

  2. If you are going to use ONLYOFFICE Document Builder with an application written in any other programming language, the second option is recommended: to run ONLYOFFICE Document Builder executable from your application and use the .docbuilder script file for the document to be created as a parameter to it. It is much more flexible and allows to change the document script files (especially if there are more than one of them) independently of your application in future. You will only need to recompile your application if you need to add more document script files to it.

    To launch ONLYOFFICE Document Builder using the second option run the following command:

    docbuilder.exe mydocument.docbuilder
    

    Visit the .docbuilder file section for more information about the file structure and rules used when creating it.

See the examples in some of the most popular programming languages at this page. More examples will be available there with the nearest ONLYOFFICE Document Builder API documentation website update.