Is there an api to merge multiple documents into one?

Hi, Is there anyways to merge multiple documents into one without using document editors? and is it possible to change document contents through api ? I looked the document build service api and it only for new document, can it be to editing the exist documents? thanks!

Hello @baiclamp

Is there anyways to merge multiple documents into one without using document editors?

We have not implemented methods for merging documents.

But it is possible to implement data transfer to JSON format
Document.ToJSON()
from a document to a new document using the docbuilder script.

Accordingly, it is possible to open several documents in succession for data transfer in this way:

// First document
builder.CreateFile("docx");
...
GlobalVariable["JSON"] = json;
builder.CloseFile();

// Second document
builder.CreateFile("docx");
    var json = GlobalVariable["JSON"]
builder.SaveFile("docx", "DocContentToJSON.docx");
builder.CloseFile();

is it possible to change document contents through api ?

If I understand you correctly
ForApiBuilder (docbuilder) Accessing elements:

  1. GetElementsCount
  2. And then use the GetElement method (https://api.onlyoffice.com/docbuilder/textdocumentapi/apidocument/getelement)

can it be to editing the exist documents?

Using document builder, you can open your own documents.

Example of script for opening documents are available at the following link: ONLYOFFICE Api Documentation - Structure of a text document