Get Started
Documentation

SetPropertyW

bool SetPropertyW(sParam, sValue);

The argument which can be trasferred to the program outside the CDocBuilder.ExecuteCommand method, i.e. either as an additional property when running ONLYOFFICE Document Builder executive file or as a part of program code, but not included into the document file script.

Please note, that for the .docbuilder file the CDocBuilder.SetPropertyW method is not used explicitly, the argument itself is used instead as an additional property for the executive, see the example below.

Parameters:

Name Type Description
sParam const wchar_t* The parameter name in Unicode format, the value is always --argument.
sValue const wchar_t* The parameter value in Unicode format, which will be used in the document.

Once added, the argument will be available as Argument variable with its parameter values set:

Argument.name === "ONLYOFFICE" // true

Example

C++

NSDoctRenderer::CDocBuilder::Initialize();
NSDoctRenderer::CDocBuilder oBuilder;
oBuilder.SetProperty("--argument", L"{\"name\":\"ONLYOFFICE\"}");
NSDoctRenderer::CDocBuilder::Dispose();

.docbuilder

docbuilder.exe "--argument={\"name\":\"ONLYOFFICE\"}" test.docbuilder

Adding or removing fonts

It is also possible to update the font list, when you either add new fonts or remove older ones. To do that the check-fonts variable is used:

Example

C++

NSDoctRenderer::CDocBuilder::Initialize();
NSDoctRenderer::CDocBuilder oBuilder;
oBuilder.SetProperty("--check-fonts", L"true");
NSDoctRenderer::CDocBuilder::Dispose();

.docbuilder

docbuilder.exe --check-fonts=true test.docbuilder