Specifies line style for a border.
Namespace: SautinSoft.DocumentAssembly: SautinSoft.Document (in SautinSoft.Document.dll) Version: 2025.2.13
SyntaxPublic Enumeration BorderStyle
MembersMember name | Value | Description |
---|
None | 0 |
No border.
|
Dotted | 1 |
Dotted line border.
|
Dashed | 2 |
Dashed line border.
|
Single | 3 |
Single line border.
|
Thick | 4 |
Thick line border.
|
Double | 5 |
Double line border.
|
DotDash | 6 |
Dot - dash line border.
|
DotDotDash | 7 |
Dot - dot - dash line border.
|
Triple | 8 |
Triple line border.
|
ThinThickSmallGap | 9 |
Thin - thick small gap line border.
|
Nil | -1 |
No border specified.
|
ThickThinSmallGap | 10 |
Thick - thin small gap line border.
|
ThinThickThinSmallGap | 11 |
Thin - thick - thin small gap line border.
|
ThinThickMediumGap | 12 |
Thin - thick medium gap line border.
|
ThickThinMediumGap | 13 |
Thick - thin medium gap line border.
|
ThinThickThinMediumGap | 14 |
Thin - thick - thin medium gap line border.
|
ThinThickLargeGap | 15 |
Thin - thick large gap line border.
|
ThickThinLargeGap | 16 |
Thick - thin large gap line border.
|
ThinThickThinLargeGap | 17 |
Thin - thick - thin large gap line border.
|
Wave | 18 |
Wave line border.
|
DoubleWave | 19 |
Double wave line border.
|
DashSmallGap | 20 |
Dashed line border.
|
DashDotStroked | 21 |
Dash - dot strokes line border.
|
Emboss3D | 22 |
3D embossed line border.
|
Engrave3D | 23 |
3D engraved line border.
|
Outset | 24 |
Outset line border.
|
Inset | 25 |
Inset line border.
|
ExampleSee Developer Guide: The simple report using DocumentBuilder
The simple report using DocumentBuilder using C#
using System;
using SautinSoft.Document;
using SautinSoft.Document.Tables;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SautinSoft.Document.Drawing;
namespace Example
{
class Program
{
static void Main(string[] args)
{
TableVariousBorders();
}
static void TableVariousBorders()
{
DocumentCore dc = new DocumentCore();
DocumentBuilder db = new DocumentBuilder(dc);
Picture logo = db.InsertImage(@"..\..\..\medical.png", new Size(50, 25, LengthUnit.Millimeter));
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.CharacterFormat.FontName = "Verdana";
db.CharacterFormat.Size = 16.5f;
db.CharacterFormat.AllCaps = true;
db.CharacterFormat.Italic = true;
db.CharacterFormat.FontColor = Color.Orange;
db.ParagraphFormat.Alignment = HorizontalAlignment.Center;
db.Writeln("Outpatient card");
db.ParagraphFormat.ClearFormatting();
db.CharacterFormat.ClearFormatting();
string namepatient = "Smith John";
string namedoctor = "Dr. Christopher Duncan Turk";
string dateofreceipt = "2021/06/03";
string dischargedate = "2021/06/24";
string year = "1961/03/03";
string address = "1775 Westminster Avenue APT D56 Brooklyn, NY, 11235";
string diagnosis = "Pneumonia (Covid19).";
string treatment = "Dexamethasone Remdesivir Anticoagulation drugs.";
Table maintable = db.StartTable();
db.TableFormat.PreferredWidth = new TableWidth(LengthUnitConverter.Convert(7, LengthUnit.Inch, LengthUnit.Point), TableWidthUnit.Point);
db.CellFormat.Borders.SetBorders(MultipleBorderTypes.Outside, BorderStyle.DotDotDash, Color.Green, 1);
db.CellFormat.BackgroundColor = Color.DarkYellow;
db.CellFormat.VerticalAlignment = VerticalAlignment.Center;
db.ParagraphFormat.Alignment = HorizontalAlignment.Center;
db.RowFormat.Height = new TableRowHeight(45f, HeightRule.Auto);
db.InsertCell();
db.Write("First/Last Name");
db.InsertCell();
db.Write("Date of Birth ");
db.InsertCell();
db.Write("Address");
db.InsertCell();
db.Write("Diagnosis");
db.InsertCell();
db.Write("Treatment");
db.EndRow();
db.CellFormat.Borders.SetBorders(MultipleBorderTypes.Outside, BorderStyle.DoubleWave, Color.Black, 1);
db.CellFormat.BackgroundColor = Color.LightGray;
db.CellFormat.VerticalAlignment = VerticalAlignment.Center;
db.ParagraphFormat.Alignment = HorizontalAlignment.Left;
db.RowFormat.Height = new TableRowHeight(100f, HeightRule.Exact);
db.InsertCell();
db.Write(namepatient);
db.InsertCell();
db.Write(year);
db.InsertCell();
db.Write(address);
db.InsertCell();
db.Write(diagnosis);
db.InsertCell();
db.Write(treatment);
db.EndRow();
db.EndTable();
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.CharacterFormat.FontName = "Calibri";
db.CharacterFormat.Size = 13.5f;
db.CharacterFormat.FontColor = Color.DarkGreen;
db.ParagraphFormat.SpecialIndentation = 100;
db.Writeln("*The card is filled in by the attending physician ");
db.ParagraphFormat.ClearFormatting();
db.CharacterFormat.ClearFormatting();
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
Table addtable = db.StartTable();
db.TableFormat.IndentFromLeft = 200;
db.TableFormat.PreferredWidth = new TableWidth(LengthUnitConverter.Convert(4, LengthUnit.Inch, LengthUnit.Point), TableWidthUnit.Point);
db.CellFormat.Borders.SetBorders(MultipleBorderTypes.Outside, BorderStyle.Dashed, Color.Orange, 2);
db.CellFormat.BackgroundColor = Color.Magenta;
db.CellFormat.VerticalAlignment = VerticalAlignment.Center;
db.ParagraphFormat.Alignment = HorizontalAlignment.Center;
db.RowFormat.Height = new TableRowHeight(15f, HeightRule.Exact);
db.InsertCell();
db.Write("Attending doctor");
db.InsertCell();
db.Write("Date of receipt");
db.InsertCell();
db.Write("Discharge date");
db.EndRow();
db.CellFormat.Borders.SetBorders(MultipleBorderTypes.Outside, BorderStyle.Dotted, Color.Purple, 2);
db.CellFormat.BackgroundColor = Color.LightGray;
db.CellFormat.VerticalAlignment = VerticalAlignment.Top;
db.ParagraphFormat.Alignment = HorizontalAlignment.Center;
db.RowFormat.Height = new TableRowHeight(25f, HeightRule.Exact);
db.InsertCell();
db.Write(namedoctor);
db.InsertCell();
db.Write(dateofreceipt);
db.InsertCell();
db.Write(dischargedate);
db.EndRow();
db.EndTable();
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak);
db.ParagraphFormat.Alignment = HorizontalAlignment.Right;
Picture sign = db.InsertImage(@"..\..\..\sign.png", new Size(50, 25, LengthUnit.Millimeter));
string filePath = "Result.pdf";
dc.Save(filePath);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(filePath) { UseShellExecute = true });
}
}
}
The simple report using DocumentBuilder using VB.Net
Imports System
Imports SautinSoft.Document
Imports SautinSoft.Document.Tables
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Threading.Tasks
Imports SautinSoft.Document.Drawing
Namespace Example
Friend Class Program
Shared Sub Main(ByVal args() As String)
TableVariousBorders()
End Sub
Private Shared Sub TableVariousBorders()
Dim dc As New DocumentCore()
Dim db As New DocumentBuilder(dc)
Dim logo As Picture = db.InsertImage("..\..\..\medical.png", New Size(50, 25, LengthUnit.Millimeter))
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.CharacterFormat.FontName = "Verdana"
db.CharacterFormat.Size = 16.5F
db.CharacterFormat.AllCaps = True
db.CharacterFormat.Italic = True
db.CharacterFormat.FontColor = Color.Orange
db.ParagraphFormat.Alignment = HorizontalAlignment.Center
db.Writeln("Outpatient card")
db.ParagraphFormat.ClearFormatting()
db.CharacterFormat.ClearFormatting()
Dim namepatient As String = "Smith John"
Dim namedoctor As String = "Dr. Christopher Duncan Turk"
Dim dateofreceipt As String = "2021/06/03"
Dim dischargedate As String = "2021/06/24"
Dim year As String = "1961/03/03"
Dim address As String = "1775 Westminster Avenue APT D56 Brooklyn, NY, 11235"
Dim diagnosis As String = "Pneumonia (Covid19)."
Dim treatment As String = "Dexamethasone Remdesivir Anticoagulation drugs."
Dim maintable As Table = db.StartTable()
db.TableFormat.PreferredWidth = New TableWidth(LengthUnitConverter.Convert(7, LengthUnit.Inch, LengthUnit.Point), TableWidthUnit.Point)
db.CellFormat.Borders.SetBorders(MultipleBorderTypes.Outside, BorderStyle.DotDotDash, Color.Green, 1)
db.CellFormat.BackgroundColor = Color.DarkYellow
db.CellFormat.VerticalAlignment = VerticalAlignment.Center
db.ParagraphFormat.Alignment = HorizontalAlignment.Center
db.RowFormat.Height = New TableRowHeight(45.0F, HeightRule.Auto)
db.InsertCell()
db.Write("First/Last Name")
db.InsertCell()
db.Write("Date of Birth ")
db.InsertCell()
db.Write("Address")
db.InsertCell()
db.Write("Diagnosis")
db.InsertCell()
db.Write("Treatment")
db.EndRow()
db.CellFormat.Borders.SetBorders(MultipleBorderTypes.Outside, BorderStyle.DoubleWave, Color.Black, 1)
db.CellFormat.BackgroundColor = Color.LightGray
db.CellFormat.VerticalAlignment = VerticalAlignment.Center
db.ParagraphFormat.Alignment = HorizontalAlignment.Left
db.RowFormat.Height = New TableRowHeight(100.0F, HeightRule.Exact)
db.InsertCell()
db.Write(namepatient)
db.InsertCell()
db.Write(year)
db.InsertCell()
db.Write(address)
db.InsertCell()
db.Write(diagnosis)
db.InsertCell()
db.Write(treatment)
db.EndRow()
db.EndTable()
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.CharacterFormat.FontName = "Calibri"
db.CharacterFormat.Size = 13.5F
db.CharacterFormat.FontColor = Color.DarkGreen
db.ParagraphFormat.SpecialIndentation = 100
db.Writeln("*The card is filled in by the attending physician ")
db.ParagraphFormat.ClearFormatting()
db.CharacterFormat.ClearFormatting()
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
Dim addtable As Table = db.StartTable()
db.TableFormat.IndentFromLeft = 200
db.TableFormat.PreferredWidth = New TableWidth(LengthUnitConverter.Convert(4, LengthUnit.Inch, LengthUnit.Point), TableWidthUnit.Point)
db.CellFormat.Borders.SetBorders(MultipleBorderTypes.Outside, BorderStyle.Dashed, Color.Orange, 2)
db.CellFormat.BackgroundColor = Color.Magenta
db.CellFormat.VerticalAlignment = VerticalAlignment.Center
db.ParagraphFormat.Alignment = HorizontalAlignment.Center
db.RowFormat.Height = New TableRowHeight(15.0F, HeightRule.Exact)
db.InsertCell()
db.Write("Attending doctor")
db.InsertCell()
db.Write("Date of receipt")
db.InsertCell()
db.Write("Discharge date")
db.EndRow()
db.CellFormat.Borders.SetBorders(MultipleBorderTypes.Outside, BorderStyle.Dotted, Color.Purple, 2)
db.CellFormat.BackgroundColor = Color.LightGray
db.CellFormat.VerticalAlignment = VerticalAlignment.Top
db.ParagraphFormat.Alignment = HorizontalAlignment.Center
db.RowFormat.Height = New TableRowHeight(25.0F, HeightRule.Exact)
db.InsertCell()
db.Write(namedoctor)
db.InsertCell()
db.Write(dateofreceipt)
db.InsertCell()
db.Write(dischargedate)
db.EndRow()
db.EndTable()
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.InsertSpecialCharacter(SpecialCharacterType.LineBreak)
db.ParagraphFormat.Alignment = HorizontalAlignment.Right
Dim sign As Picture = db.InsertImage("..\..\..\sign.png", New Size(50, 25, LengthUnit.Millimeter))
Dim filePath As String = "Result.pdf"
dc.Save(filePath)
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(filePath) With {.UseShellExecute = True})
End Sub
End Class
End Namespace
See Also