Skip to content
ComPDF
DemoSampleAPI ReferenceFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Separators

java
// Create separator
CLineSeparator separator = div.createLineSeparatorElement();

// Set line style
separator.setLineWidth(2f);
separator.setLineType(CLineSeparator.CPDFLineType.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));