Documentation Builder Commands (Template Language)
Command | Result Type | Description |
---|---|---|
SwitchBold | Void |
Toggles bold formatting for the forthcoming text in the current context. No parameters are needed. |
SwitchItalic | Void |
Toggles italic formatting for the forthcoming text. No parameters are needed. |
SwitchUnderline | Void |
Toggles underline formatting for the forthcoming text. No parameters are needed. |
SwitchStrikethrough | Void |
Toggles strikethrough formatting for the forthcoming text. No parameters are needed. |
SwitchStrikeout | Void |
Toggles strikeout formatting for the forthcoming text, similar to strikethrough. No parameters are needed. |
SetFontSize(size:Number) | Void |
Sets the font size for the forthcoming text. Parameter: The desired font size as a number. Example: |
SetFontName(fontName:String) | Void |
Sets the font name for the forthcoming text. Parameter: The name of the font to use. Example: |
SetTextColor(colorInRgbHex:String) | Void |
Sets the text color for the forthcoming text using an RGB hex code. Parameter: The color in RGB hex format (e.g., #FF0000 for red). Example: |
SetBackgroundColor(colorInRgbHex:String) | Void |
Sets the background color for the forthcoming text using an RGB hex code. Parameter: The background color in RGB hex format. Example: |
AddTable(cols:Number, rows:Number, width:Number, height:Number) | Void |
Creates a new table with the specified number of columns and rows, and starts its editing. The width and height parameters define the table's dimensions. Parameters:
Example: |
EndTable | Void |
Exits table editing mode, finalizing the changes made to the current table. |
SetTableColumnSize(columnIndex:Number, relativeSize:Number) | Void |
Sets the size of a specific column in the current table relative to the table's total width. Parameters:
Example: |
SetTableStyle(styleName:String) | Void |
Applies a predefined style to the current table. Parameter: The name of the style to apply. Example: |
SetCellBackgroundColor(colorInRgbHex:String) | Void |
Sets the background color of the current cell using an RGB hexadecimal color code. Parameter: The RGB hexadecimal color code for the background color. Example: |
SetCellBorders(borders:BorderDefinition) | Void |
Defines the border properties for the current cell, including style, thickness, and color. Parameter: A border definition object specifying the desired border styles and properties. Example: Usage context implies this command requires a structured definition, such as |
AddNewTableRow | Void |
Creates a new table row, adds it to the current table, and sets it as the current context for further editing. This command does not require parameters. |
AddNewTableColumn | Void |
Creates a new table column, adds it to the current table, and sets it as the current context for further modifications. This command does not require parameters. |
GoToNextTableCell | Void |
Navigates to the next cell in the current table, setting it as the current editing context. This command enables sequential cell editing within a table. |
GoToPreviousTableCell | Void |
Navigates to the previous cell in the current table, allowing for backward navigation in the table editing process. This command is useful for revisiting and editing cells in a non-linear order. |
AddNewParagraph | Void |
Adds a new paragraph to the document and sets it as the current editing context. This command facilitates structured text formatting and organization. No parameters are needed for this command. |
AddNewPage | Void |
Adds a new page to the document and sets it as the current editing context, allowing for multi-page document creation and management. No parameters are needed for this command. |
AddText(text:String) | Void |
Adds plain text to the current paragraph. This command allows for the insertion of unformatted text content. Parameter: The text string to add. Example: |
AddText(text:FormattedText) | Void |
Adds formatted text to the current paragraph. This variant of the AddText command is designed for text that includes formatting specifications. Parameter: The formatted text object to add. Example: |
AddTextLine(text:String) | Void |
Adds text followed by a line break to the current paragraph, effectively starting a new line after the text. Parameter: The text string to add. Example: |
AddTemplateText(text:String) | Void |
Adds template text to the current paragraph. This command is useful for inserting text that includes template variables. Parameter:
Supported template variables includes:
Example: |
AddImage(image:Image, [width:Number], [height:Number]) | Void |
Adds an image to the current paragraph. Optional width and height parameters allow for size customization of the inserted image. Parameters:
Example: |
SetPageSize(width:Number, height:Number) | Void |
Sets the dimensions of the pages in the document. This command allows for customization of the page size to suit different standards or preferences. Parameters:
Example: |
SetPageMargins(left:Number, right:Number, top:Number, bottom:Number) | Void |
Defines the margins of the pages in the document, allowing for precise control over the layout and the amount of white space around the page content. Parameters:
Example: |
SetPageHeaderOffset(value:Number) | Void |
Sets the distance between the top of the page and the header. This command is useful for adjusting the position of headers in relation to the top page margin. Parameter: The offset value for the header. Example: |
SetPageFooterOffset(value:Number) | Void |
Sets the distance between the bottom of the page and the footer. This adjustment is key for customizing the footer's location relative to the bottom page margin. Parameter: The offset value for the footer. Example: |
SetParagraphLineSpacing(value:Number) | Void |
Sets the line spacing for the current paragraph, affecting the vertical space between lines of text. Parameter: The line spacing value, typically as a multiplier (e.g., 1.5 for one-and-a-half spacing). Example: |
SetParagraphLeftIndent(value:Number) | Void |
Sets the left indent for the current paragraph, adjusting the horizontal start position of the text. Parameter: The size of the left indent in millimeters. Example: |
SetParagraphRightIndent(value:Number) | Void |
Sets the right indent for the current paragraph, controlling the end margin of the text on the page. Parameter: The size of the right indent. Example: |
SetParagraphFirstLineIndent(value:Number) | Void |
Sets the indent of the first line of the current paragraph, typically used to distinguish the beginning of new paragraphs. Parameter: The size of the indent for the first line. Example: |
SetParagraphSpaceBefore(value:Number) | Void |
Adds space before the current paragraph, affecting the vertical gap between this paragraph and the one preceding it. Parameter: The size of the space before the paragraph. Example: |
SetParagraphSpaceAfter(value:Number) | Void |
Adds space after the current paragraph, influencing the vertical separation between this paragraph and the following one. Parameter: The size of the space after the paragraph. Example: |
SetLeftAlignment | Void |
Sets the alignment of the current paragraph to left. This is the default text alignment in most document formats. No parameters are needed for this command. |
SetRightAlignment | Void |
Sets the alignment of the current paragraph to right. Useful for aligning text to the right margin of the document. No parameters are needed for this command. |
SetCenterAlignment | Void |
Centers the current paragraph's text. This alignment is often used for headings, titles, or any text that needs to be emphasized by centering. No parameters are needed for this command. |
SetJustifiedAlignment | Void |
Sets the alignment of the current paragraph to justified. This alignment option adjusts the spacing of words so that the text aligns with both the left and right margins, creating a clean and formal appearance. No parameters are needed for this command. |
SetParagraphHeading(level:Number) | Void |
Sets the current paragraph as a heading of the specified level. Heading levels typically range from 1 (main heading) to 6 (lowest subheading), similar to HTML heading tags (h1 to h6). Parameter: The heading level. Example: |
SetParagraphBackgroundColor(colorInRgbHex:String) | Void |
Sets the background color of the current paragraph using an RGB hexadecimal color code. This command can highlight or differentiate paragraphs visually. Parameter: The RGB hexadecimal color code for the background color. Example: |
SetParagraphBorders(colorInRgbHex:String) | Void |
Applies border styling to the current paragraph with the specified color. This command is useful for emphasizing or separating paragraphs visually. Parameter: The RGB hexadecimal color code for the border color. Example: |
SetParagraphNormalText | Void |
Defines the current paragraph as normal text, resetting any heading or title styles applied previously. This command is used to ensure standard text formatting is applied. No parameters are needed for this command. |
SetParagraphTitle | Void |
Sets the current paragraph to the title type, applying pre-defined formatting suitable for document titles. This command is typically used once per document for the main title. No parameters are needed for this command. |
SetParagraphSubtitle | Void |
Defines the current paragraph as a subtitle, applying a specific style that differentiates it from the title and normal text. Suitable for document sections or subheadings. No parameters are needed for this command. |
SetParagraphStyle(style:String) | Void |
Applies a predefined paragraph style to the current paragraph. This command allows for the customization and consistent application of text styles throughout a document. Parameter: The name of the style to apply. Example: |
ContinueNumberedList | Void |
Continues numbering from the previous numbered list. This command is useful for resuming list numbering after interruptions by text or other elements. |
StartNumberedList | Void |
Begins a new numbered list. This command is used to start enumerating items, typically for ordered lists. |
StartBulletedList | Void |
Initiates a new bulleted list. Use this command for unordered lists where items are marked with bullets. |
SetParagraphNumbering(numberingName:String) | Void |
Applies a specific numbering style to the current paragraph. This allows for customized list numbering formats. Parameter: The name of the numbering style to apply. |
SetParagraphNumberingLevel(level:Number) | Void |
Sets the indentation level of the current list item, affecting its hierarchy within nested lists. Parameter: The indentation level for the list item. |
EditHeader | Void |
Switches the editing context to the header of the document, allowing for header customization. |
EditFooter | Void |
Switches the editing context to the footer of the document, enabling footer customization. |
EditBody | Void |
Changes the editing context back to the main document body from other contexts such as header, or footer. |
Px(value:Number) | Measurement |
Returns a length set in pixels. Useful for specifying measurements in commands that require length values. Parameter: The length in pixels. |
Cm(value:Number) | Measurement |
Returns a length set in centimeters. Useful for specifying measurements in commands that require length values. Parameter: The length in centimeters. |
Mm(value:Number) | Measurement |
Returns a length set in millimeters. Useful for specifying measurements in commands that require length values. Parameter: The length in millimeters. |
Inch(value:Number) | Measurement |
Returns a length set in inches. Useful for specifying measurements in commands that require length values. Parameter: The length in inches. |
CreateTableStyle | TableStyle | Creates and returns a new, empty table style object. This object can be customized and applied to tables within the document to standardize their appearance. |
CreateParagraphStyle | ParagraphStyle | Generates and returns a new, empty paragraph style object. This allows for the definition and application of consistent text formatting and styling throughout the document. |
CreateBordersDefinition(width:Number, colorInRgbHex:String) | BorderDefinition | Creates and returns a border definition with uniform width and color. This definition can be applied to elements like tables and paragraphs to add borders around them. Parameters:
|
CreateBordersDefinition(leftWidth:Number, leftColor:String, rightWidth:Number, rightColor:String, topWidth:Number, topColor:String, bottomWidth:Number, bottomColor:String) | BorderDefinition | Creates and returns a border definition that allows for different widths and colors for each side of an element. This enables detailed customization of borders for enhanced visual appeal. Parameters:
|
DocumentBodyWidth | Number | Returns the width of the document body in the current document's default unit of measurement. This information is useful for sizing and aligning elements within the document layout. |
ChangeFontName(input:FormattedText, fontName:String) | FormattedText |
Applies a new font name to the input text, returning a copy of the text with the updated font setting. Parameters:
|
ChangeFontSize(input:FormattedText, fontSize:Number) | FormattedText |
Modifies the font size of the input text, producing a copy with the new size. Parameters:
|
ChangeFontBold(input:FormattedText, value:Boolean) | FormattedText |
Toggles the bold styling of the input text based on the provided boolean value. Parameters:
|
ChangeFontItalic(input:FormattedText, value:Boolean) | FormattedText |
Applies or removes italic styling from the input text, depending on the boolean value provided. Parameters:
|
ChangeFontUnderline(input:FormattedText, value:Boolean) | FormattedText |
Applies or removes underline styling from the input text based on the provided boolean value. Parameters:
|
ChangeFontStrikeout(input:FormattedText, value:Boolean) | FormattedText |
Applies or removes strikeout styling from the input text, as indicated by the boolean value. Parameters:
|
ChangeFontStrikethrough (alias for ChangeFontStrikeout) | FormattedText | Alias for ChangeFontStrikeout; performs the same function of applying or removing strikeout styling. |
ChangeTextColor(input:FormattedText, colorInRgbHex:String) | FormattedText |
Changes the text color of the input formatted text to the specified RGB hexadecimal value. Parameters:
|
ChangeTextBackgroundColor(input:FormattedText, colorInRgbHex:String) | FormattedText |
Modifies the background color of the input text using the specified RGB hexadecimal color code. Parameters:
|
SetTextStyle(styleName:String) | Void |
Applies a named text style to the current editing context. Parameter: |
SetTextStyle(style:TextStyle) | Void |
Applies a text style object to the current editing context. Parameter: |
GetTextStyle(styleName:String) | TextStyle |
Retrieves a named text style. Parameter: |
ChangeTextStyle(input:FormattedText, style:TextStyle) | FormattedText |
Changes the style of the provided formatted text to the specified TextStyle. Parameters:
|
ChangeTextStyle(input:FormattedText, styleName:String) | FormattedText |
Modifies the style of the provided formatted text to a style identified by name. Parameters:
|
ChangeTextAlign(input:FormattedText, alignment:String) | FormattedText |
Changes the alignment of the provided formatted text. Parameters:
|
AddParagraphTab(offset:Number, alignment:String, leaderChar:String) | Void |
Adds a tab stop to the current paragraph with specified offset, alignment, and leader character. Parameters:
|
SetDefaultTab(offset:Number) | Void |
Sets the default tab stop offset for the document. Parameter: |
ClearParagraphTabs | Void |
Clears all custom tab stops from the current paragraph, reverting to the document's default tab settings. No parameters are needed for this command. |
New Comment