Get Started
Documentation

RunTextA

bool RunTextA(sCommands);

Run the all the commands for the document creation using a single command. Compared to CDocBuilder.ExecuteCommand where only one command at a time is allowed, CDocBuilder.RunTextA makes it possible to enter all the commands for the document creation at once.

Please note, that for the .docbuilder file the CDocBuilder.RunTextA method is not used.

Parameters:

Name Type Description
sCommands const char* The commands in UTF8 format which will be used to create the document file (in C++ the escape character must be used when the command contains quotation symbols). All the commands containing builder. are line separated, i.e. you cannot write them in one line, each command must start with its own line.

Example

C++

NSDoctRenderer::CDocBuilder::Initialize();
NSDoctRenderer::CDocBuilder oBuilder;
oBuilder.RunTextA(L"builder.SetTmpFolder(\"D:/DocBuilderTemp\");\n\
builder.CreateFile(\"docx\");\n\
var oDocument = Api.GetDocument();var oParagraph;oParagraph = oDocument.GetElement(0);oParagraph.SetJc(\"center\");oParagraph.AddText(\"Center\");\n\
builder.SaveFile(\"pdf\", \"D:/TESTFILES/images.pdf\");\n\
builder.CloseFile();");
NSDoctRenderer::CDocBuilder::Dispose();