SpecialCharacterType Enumeration |
Represents the special character type.
Namespace: SautinSoft.DocumentAssembly: SautinSoft.Document (in SautinSoft.Document.dll) Version: 2024.7.18
Syntax public enum SpecialCharacterType
Public Enumeration SpecialCharacterType
Members Member name | Value | Description |
---|
LineBreak | 0 |
Specifies that the document content shall restart on the next line.
|
PageBreak | 1 |
Specifies that the document content shall restart on the next page.
|
ColumnBreak | 2 |
Specifies that the document content shall restart on the next column available
on the current page.
|
Tab | 3 |
Specifies that the position of the current line of text will advance to the next
TabStop location which is further along than the
starting location of the tab or to nearest multiple of the default tab stop width.
|
AbsoluteTab | 4 |
Specifies that the position of the current line of text will advance to
the position specified by
Alignment and
RelativeTo properties.
|
NoteMark | 5 |
Specifies that the current position holds the reference to footnote or endnote element.
|
NoteSeparator | 6 |
Specifies the location of footnote or endnote area separator.
|
NoteContinuationSeparator | 7 |
Specifies the location of footnote or endnote area continuation separator.
|
Example See Developer Guide: Insert a Line Break, Column Break, Page Break
Insert a Line Break, Column Break, Page Break using C#
using System;
using SautinSoft.Document;
using System.Text;
namespace Example
{
class Program
{
static void Main(string[] args)
{
InsertingBreak();
}
static void InsertingBreak()
{
DocumentCore dc = new DocumentCore();
DocumentBuilder db = new DocumentBuilder(dc);
string resultPath = @"Result.docx";
db.PageSetup.TextColumns = new TextColumnCollection(2);
db.CharacterFormat.FontName = "Verdana";
db.CharacterFormat.Size = 16.5f;
db.CharacterFormat.AllCaps = true;
db.CharacterFormat.Italic = true;
db.CharacterFormat.FontColor = Color.Orange;
db.ParagraphFormat.LeftIndentation = 30;
db.Writeln("This paragraph has a Left Indentation of 30 points.");
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.ParagraphFormat.ClearFormatting();
db.CharacterFormat.ClearFormatting();
db.Writeln("After this paragraph insert a column break.");
db.InsertSpecialCharacter(SpecialCharacterType.ColumnBreak);
db.CharacterFormat.Italic = true;
db.CharacterFormat.FontColor = Color.DarkBlue;
db.CharacterFormat.Size = 20f;
db.Writeln("After this paragraph insert a page break.");
db.InsertSpecialCharacter(SpecialCharacterType.PageBreak);
dc.Save(resultPath);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(resultPath) { UseShellExecute = true });
}
}
}
Insert a Line Break, Column Break, Page Break using VB.Net
Imports System
Imports SautinSoft.Document
Imports System.Text
Namespace Example
Friend Class Program
Shared Sub Main(ByVal args() As String)
InsertingBreak()
End Sub
Private Shared Sub InsertingBreak()
Dim dc As New DocumentCore()
Dim db As New DocumentBuilder(dc)
Dim resultPath As String = "result.docx"
db.PageSetup.TextColumns = New TextColumnCollection(2)
db.CharacterFormat.FontName = "Verdana"
db.CharacterFormat.Size = 16.5F
db.CharacterFormat.AllCaps = True
db.CharacterFormat.Italic = True
db.CharacterFormat.FontColor = Color.Orange
db.ParagraphFormat.LeftIndentation = 30
db.Writeln("This paragraph has a Left Indentation of 30 points.")
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.ParagraphFormat.ClearFormatting()
db.CharacterFormat.ClearFormatting()
db.Writeln("After this paragraph insert a column break.")
db.InsertSpecialCharacter(SpecialCharacterType.ColumnBreak)
db.CharacterFormat.Italic = True
db.CharacterFormat.FontColor = Color.DarkBlue
db.CharacterFormat.Size = 20.0F
db.Writeln("After this paragraph insert a page break.")
db.InsertSpecialCharacter(SpecialCharacterType.PageBreak)
dc.Save(resultPath)
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(resultPath) With {.UseShellExecute = True})
End Sub
End Class
End Namespace
See Also