---
title: "Separators"
canonical_url: "https://www.compdf.com/guides/generation-sdk/dotnet-core/generation/layout-api-separators"
md_url: "https://www.compdf.com/guides/generation-sdk/dotnet-core/generation/layout-api-separators.md"
description: "ComPDF SDK Guides. In this developer's guide, all the details and how to use ComPDF for SDK Guides will be covered in depth."
---

# Separators

```csharp
// Create separator
CLineSeparator separator = div.CreateLineSeparator();

// Set line style
separator.SetLineWidth(2f);
separator.SetLineType(CLineSeparatorType.Solid); // Solid, Dashed, Dotted
separator.SetLineColor(new CColor(200, 200, 200, 255));

// Set separator width (uses all available width by default)
separator.SetWidth(CUnitValue.CreatePercentValue(80));
```
