Get Started
Usage API
More information

GetDocument

GetDocument() → { ApiDocument }

Get the main document.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiDocument

Example

Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oParagraph;
oParagraph = Api.CreateParagraph();
oParagraph.AddText("This is a new paragraph");
oDocument.Push(oParagraph);
builder.SaveFile("docx", "GetDocument.docx");
builder.CloseFile();

Resulting document