SetRightBorder
Specifies the border which will be displayed at the right side of the page around the specified paragraph.
Parameters:
Name |
Type |
Description |
sType |
BorderType
|
The border style. |
nSize |
pt_8
|
The width of the current right border measured in eighths of a point. |
nSpace |
pt
|
The spacing offset to the right of the paragraph measured in points used to place this border. |
r |
byte
|
Red color component value. |
g |
byte
|
Green color component value. |
b |
byte
|
Blue color component value. |
Returns:
-
This method doesn't return any data.
Example
Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is the first paragraph. We will add a two point orange border at its right side. ");
oParagraph.AddText("The space between the right side of the paragraph and the border is 8 points. ");
oParagraph.AddText("These sentences are used to add lines for demonstrative purposes. ");
oParagraph.AddText("These sentences are used to add lines for demonstrative purposes.");
oParagraph.SetRightBorder("single", 16, 8, 255, 111, 61);
builder.SaveFile("docx", "SetRightBorder.docx");
builder.CloseFile();
Resulting document