跳到主要内容

Api

Represents the Api class.

Methods

MethodReturnsDescription
AddCommentApiCommentAdds a comment to the specifed document element or array of Runs.
CentimetersToPointsnumberConverts centimeters to points.
ConvertDocumentstringConverts a document to Markdown or HTML text.
CreateBlipFillApiFillCreates a blip fill to apply to the object using the selected image as the object background.
CreateBlockLvlSdtApiBlockLvlSdtCreates a new block level container.
CreateChartApiChartCreates a chart with the parameters specified.
CreateCheckBoxContentControlApiInlineLvlSdtCreates a checkbox content control.
CreateComboBoxContentControlApiInlineLvlSdtCreates a new combo box container with the given list of options.
CreateCustomGeometryApiGeometryCreates a new custom geometry.
CreateDatePickerContentControlApiInlineLvlSdtCreates a new date picker content control.
CreateDropDownListContentControlApiInlineLvlSdtCreates a new drop-down list container with the given list of options.
CreateGradientStopApiGradientStopCreates a gradient stop used for different types of gradients.
CreateGroupApiGroupGroups an array of drawings.
CreateHyperlinkApiHyperlinkCreates a new hyperlink text block to be inserted to the current paragraph or table.
CreateImageApiImageCreates an image with the parameters specified.
CreateInlineLvlSdtApiInlineLvlSdtCreates a new inline container.
CreateLinearGradientFillApiFillCreates a linear gradient fill to apply to the object using the selected linear gradient as the object background.
CreateNoFillApiFillCreates no fill and removes the fill from the element.
CreateOleObjectApiOleObjectCreates an OLE object with the parameters specified.
CreateParaPrApiParaPrCreates the empty paragraph properties.
CreateParagraphApiParagraphCreates a new paragraph.
CreatePatternFillApiFillCreates a pattern fill to apply to the object using the selected pattern as the object background.
CreatePictureContentControlApiInlineLvlSdtCreates a new picture container.
CreatePresetColorApiPresetColorCreates a color selecting it from one of the available color presets.
CreatePresetGeometryApiGeometry | nullCreates a geometry using one of the available preset shapes.
CreateRGBColorApiRGBColorCreates an RGB color setting the appropriate values for the red, green and blue color components.
CreateRadialGradientFillApiFillCreates a radial gradient fill to apply to the object using the selected radial gradient as the object background.
CreateRangeApiRange | nullCreates an element range. If you do not specify the start and end positions, the range will be taken from the entire element.
CreateRunApiRunCreates a new smaller text block to be inserted to the current paragraph or table.
CreateSchemeColorApiSchemeColorCreates a complex color scheme selecting from one of the available schemes.
CreateShapeApiShapeCreates a shape with the parameters specified.
CreateSolidFillApiFillCreates a solid fill to apply to the object using a selected solid color as the object background.
CreateStrokeApiStrokeCreates a stroke adding shadows to the element.
CreateTableApiTableCreates a new table with a specified number of rows and columns.
CreateTableCellPrApiTableCellPrCreates the empty table cell properties.
CreateTablePrApiTablePrCreates the empty table properties.
CreateTableRowPrApiTableRowPrCreates the empty table row properties.
CreateTableStylePrApiTableStylePrCreates the empty table style properties.
CreateTextPrApiTextPrCreates the empty text properties.
CreateWordArtApiDrawingCreates a Text Art object with the parameters specified.
EmusToPointsnumberConverts EMUs (English Metric Units) to points.
FromJSONobjectConverts the specified JSON object into the Document Builder object of the corresponding type.
GetByInternalIdobjectReturns the object by it's internal ID.
GetDocumentApiDocumentReturns the main document.
GetFullNamestringReturns the full name of the currently opened file.
GetMailMergeReceptionsCountnumberReturns the mail merge receptions count.
GetMailMergeTemplateDocContentApiDocumentContentReturns the mail merge template document.
InchesToPointsnumberConverts inches to points.
LinesToPointsnumberConverts lines to points (1 line = 12 points).
LoadMailMergeDatabooleanLoads data for the mail merge.
MailMergebooleanStarts the mail merge process.
MillimetersToPixelsnumberConverts millimeters to pixels.
MillimetersToPointsnumberConverts millimeters to points.
PicasToPointsnumberConverts picas to points.
PixelsToEmusnumberConverts pixels to EMUs (English Metric Units).
PixelsToPointsnumberConverts pixels to points.
PointsToCentimetersnumberConverts points to centimeters.
PointsToEmusnumberConverts points to EMUs (English Metric Units).
PointsToInchesnumberConverts points to inches.
PointsToLinesnumberConverts points to lines (1 line = 12 points).
PointsToMillimetersnumberConverts points to millimeters.
PointsToPicasnumberConverts points to picas (1 pica = 12 points).
PointsToPixelsnumberConverts points to pixels.
PointsToTwipsnumberConverts points to twips.
ReplaceDocumentContentbooleanReplaces the main document content with another document content.
ReplaceTextSmartbooleanReplaces each paragraph (or text in cell) in the select with the corresponding text from an array of strings.
SavebooleanSaves changes to the specified document.
TwipsToPointsnumberConverts twips to points.
attachEventbooleanSubscribes to the specified event and calls the callback function when the event fires.
detachEventbooleanUnsubscribes from the specified event.